Skip to content

Git Workflow

TheSuperDuck edited this page Oct 10, 2018 · 4 revisions

Definitions

Public branches

The authoritative history of the project, in which every commit should be succinct, atomic, well documented, and error-free
Examples: master, develop, and public feature branches

Private branches

Your scratch paper while working out a problem

The Workflow

Feature Branches

  1. Create a private feature branch off a public branch other than master
  2. Regularly commit your work to this private branch
  3. Once your code is perfect, clean up its history and squash all Work in Progress commits
  4. Merge the cleaned-up branch back into the public branch

Master and Develop

  1. Merge all new changes to develop
  2. When the code is production-ready, merge develop into master with the --no-ff flag
  3. To release a new version, tag the master branch with the version number in the form of "vmajor.minor.patch"

Details and Explanation

A successful Git branching model: https://nvie.com/posts/a-successful-git-branching-model/
Understanding the Git Workflow: https://sandofsky.com/blog/git-workflow.html

Clone this wiki locally