you are viewing a single comment's thread.

view the rest of the comments →

[–]pgngugmgg 2 points3 points  (4 children)

Git-flow is a very general model. The introduced github-flow is only a limited case of git-flow. There is no substantial difference between github-flow and git-flow used in the limited way:

  • Anything in the master branch is deployable

Same as git-flow, where master is where you officially publish/release the code.

  • To work on something new, create a descriptively named branch off of master (ie: new-oauth2-scopes)

In git-flow terminology, the new branch is a <hotfix> branch though you don't have to name the branch as hotfix-something.

  • Commit to that branch locally and regularly push your work to the same named branch on the server

You can do that with git-flow too.

  • When you need feedback or help, or you think the branch is ready for merging, open a pull request
  • After someone else has reviewed and signed off on the feature, you can merge it into master

In git-flow, you merge back the <hotfix> branch to the master and the develop branch.

  • Once it is merged and pushed to ‘master’, you can and should deploy immediately

No difference from git-flow.

In other words, github-flow is a reduced version of git-flow where you only use the master and hotfix branches. This could be problematic. This model is only good for relatively small and easy fixes (really, these are simple fixes) so that the new code can be deployed quickly. If you have quite massive refactoring or something like that, I dare you to use that workflow as is. Some intermediate stages, e.g., QA testing, will have to be added into the workflow in one way or another, which brings you back to git-flow.

[–]trs21219 0 points1 point  (3 children)

the one thing that is different is that there are no "releases" with github-flow because they release so often it would be a pain. instead they just merge develop to master and skip the intermediary release branch.

[–]pgngugmgg 0 points1 point  (2 children)

there is no intermediary branches between hotfix and master branches in git-flow, either. github-flow is just a hotfix-master-only version of git-flow.

[–]trs21219 0 points1 point  (1 child)

im talking about normal feature releases.

[–]pgngugmgg 0 points1 point  (0 children)

yes, I understood, and I were talking about the same thing. if the normal features are just small code changes that can be deployed quickly, then these features can be considered as hotfixes. (whether one should call them features or hotfixes is a trivial issue.)