Git工作流程提示 [英] Git workflow tips
问题描述
我开始使用git,现在已经使用它几个月了,我很好奇我的工作流程是否正确。我在这个项目的两个不同的地方工作。这里是我的工作流程的阶段:
- 我从远程仓库拉项目
- 新功能的本地分支
- 进行更改并提交
- 将分支合并到master
- 远程
是这个项目工作的正确方式吗?
正如Amber所说:
首先,让我们明确一点:没有单一的正确Git的
工作流程。只有工作流程可行 - 特别是
,工作流程适合你。
有一篇很好的文章关于一个好的git工作流的博客:
您应该阅读这篇文章,它非常酷,您可以根据需要调整工作流程。
简而言之,博客文章提出的工作流程如下图所示:
我已经采用了这个工作流了一段时间。我尝试始终尊重工作流程,无论是团队合作还是独自工作。
I started using git and have been using it for couple of months now, and I am curious if my workflow is correct. I work from two different places on the project. here are the stages of my workflow:
- I pull the project from remote repo
- make a local branch for a new feature
- make changes and commit
- merge the branch with master
- push to the remote
is this correct way of working on the project?
As Amber said :
First, let's just make something clear: there is no single "correct" workflow for Git. There are merely workflows that work - and specifically, workflows that work for you.
There is a good post on a blog about a good git workflow :
A successful Git branching model
You should read this post, it's really cool and you can adapt the workflow to your needs. In a nutshell, the workflow proposed by the blog post schematized like this :
I have adopted this workflow for a while. I try to always respect the workflow, whether it's a teamwork or working alone.
这篇关于Git工作流程提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!