We have recently started to use GitLab.
Currently using a "centralized" workflow.
We are considering moving to the github-flow but I want to make sure.
What are the pros and cons of git-flow vs github-flow?
As discussed in GitMinutes episode 17, by Nicholas Zakas in his article on "GitHub workflows inside of a company":
Git-flow is a process for managing changes in Git that was created by Vincent Driessen and accompanied by some Git extensions for managing that flow.
The general idea behind git-flow is to have several separate branches that always exist, each for a different purpose:master
,develop
,feature
,release
, andhotfix
.
The process of feature or bug development flows from one branch into another before it’s finally released.Some of the respondents indicated that they use
git-flow
in general.
Some started out withgit-flow
and moved away from it.The primary reason for moving away is that the
git-flow
process is hard to deal with in a continuous (or near-continuous) deployment model.
The general feeling is thatgit-flow
works well for products in a more traditional release model, where releases are done once every few weeks, but that this process breaks down considerably when you’re releasing once a day or more.
In short:
Start with a model as simple as possible (like GitHub flow tends to be), and move towards a more complex model if you need to.
You can see an interesting illustration of a simple workflow, based on GitHub-Flow at:
"A simple git branching model", with the main elements being:
master
must always be deployable.- all changes made through feature branches (pull-request + merge)
- rebase to avoid/resolve conflicts; merge in to
master
For an actual more complete and robust workflow, see gitworkflow (one word).