What are the pros and cons of git-flow vs github-flow?

We recently started using GitLab.

A “centralized” workflow is currently in use.

We are considering switching to a github thread, but I want to make sure.

What are the pros and cons of git -flow vs github-flow ?

+113
gitlab git-flow
Aug 12 '13 at 13:39 on
source share
4 answers

As discussed in GitMinutes episode 17, Nicholas Zakas in his article, " GitHub Workflows Inside the Company ":

Git -flow is a Git change management process that was created by Vincent Drissen and was accompanied by some Git extensions to manage this thread.
The general idea of ​​git -flow is to have several separate branches that always exist for different purposes: master , develop , feature , release and hotfix .
The process of developing a function or error flows from one branch to another until it is finally released.

Some respondents indicated that they use git-flow in general.
Some started with git-flow and moved away from it.

The main reason for the move is that the git-flow process is difficult to handle in a continuous (or nearly continuous) deployment model.
The general feeling is that git-flow works well for products in a more traditional release model, where they are released once every few weeks, but this process is significantly reduced when you release once a day or more .

In short:

Start with the simplest model possible (for example, the GitHub stream, as a rule) and move on to a more complex model if you need to.




You can see an interesting illustration of a simple GitHub-Flow- based workflow in:
" Simple branching Git model ", the main elements of which are:

  • master should always be deployed.
  • all changes made through function branches (pull-request + merge)
  • rebase to avoid / resolve conflicts; merge into master

https://a248.e.akamai.net/camo.github.com/9783623eba280bal

+118
Aug 12 '13 at 13:55 on
source share

There is no workflow with silver bullets where everyone should follow, since all models are suboptimal. Having said that, you can choose the appropriate model for your software based on the points below;

Multiple Production Versions - Use Git -flow

If your code has several versions in production (i.e. typical software products such as operating systems, office suites, custom applications, etc.), you can use git-flow. The main reason is that you need to constantly maintain previous versions in production, while developing the next version.

Single version in software simplicity - use Github-flow

If your code always has only one version in production (i.e. web sites, web services, etc.), you can use github-flow. The main reason is that you do not need to create complex things for the developer. After the developer completes the work or completes the fix, he immediately advances to the production version.

Single production version but very sophisticated software - use Gitlab-flow

Large software such as Facebook and Gmail may require deployment branches between a branch and a master branch, where CI / CD tools can run before they go into production. The idea is to introduce additional protection for the production version, as it is used by millions of people.

+71
Mar 10 '16 at 11:25
source share

I have been using the git -flow model for over a year and its normal.

But it really depends on how your application is developed and deployed.

This works well when you have an application with a slow development / deployment flow.

But, for example, like GitHub, we have an application that has a fast development / deployment flow, we deploy every day, and sometimes several times a day, in this case git-flow tends to slow down everything, in my opinion, and I use the GitHub stream.

Another thing is that git -flow is not standard git, so you could, and when I say that I can, I really mean, you will find developers who do not know this, and then there is a learning curve, there’s a better chance of damaging things . Also, as mentioned above, someone developed a set of scripts to facilitate the use of git-flow, so you do not need to remember all the commands, this will help you with the teams, but remember that the actual flow is your work, I came across more than once, I didn’t know if this was a correction or function, or even worse when they couldn’t remember the stream and all that.

There is at least one GUI that supports git-flow for Mac and Windows SourceTree .

These days, I'm leaning more towards the GitHub stream due to its simplicity and easy management. Also, due to the "deployment of early deployment often" ...

Hope this helps

+35
Sep 25 '13 at 21:51
source share

I worked with “From Micro to Macro - GIT Branching and Workflow Models” and found this very useful for websites and web service projects.

0
Jan 27 '19 at 0:25
source share



All Articles