Skip to content

Instantly share code, notes, and snippets.

@nordfjord
Created March 3, 2016 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nordfjord/fc8b4f2c0fa7e784e3de to your computer and use it in GitHub Desktop.
Save nordfjord/fc8b4f2c0fa7e784e3de to your computer and use it in GitHub Desktop.
Git workflow comparison

GitHub flow

  • Anything on master is deployable
  • To work on something new, create a descriptively named branch off of master (i.e. stream-item-margins)
  • Commit to that branch locally and regularly push your work to the same named branch on the server
  • 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
  • Once it is merged and pushed to ‘master’ on the origin, you can and should deploy immediately

All to master

  • Each feature or hot fix is worked on in dev environment that is similar to production, that allows business owner direct access for testing and approval. Changes are committed locally.
  • Once approved by the business owner, commit and push changes to master on origin, and then deploy to production immediately.

Gitflow

  • All work is done in a branch. Features are branched off develop. Hot fixes are treated different and are branched off master.
  • Features are merged back into develop after approval.
  • Develop is merged into a release branch.
  • Hot fixes are merged back into master, but also must be merged into develop and the release branch.
  • The release branch is merged into master.
  • Master is deployed to production.

Reverse Gitflow

  • All development happens on master
  • feature branches are merged off and then merged back into master
  • master is branched into a new release branch
  • release branches are then merged into a branch called "production" after testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment