Branch Organization
We use what's called the Gitflow workflow, which you can read about in detail over here. We won't be installing the git-flow program or running any of the git flow commands, since as long as you understand how it works, all of it is doable with just Git.
Essentially, it boils down to these main points:
- The
masterbranch should only have stable, tested code. - Feature branches branch off
devand merge back intodevwhen completed. Feature branches should be the only places where new features are added. - When we reach a point, a release branch is branched off dev, tested and fixed if necessary, and merged into both
masterand back intodevwhen we deem it stable enough. - Hotfix branches branch off
masterwhen we need to fix a problem that is in themasterbranch, and are merged back when the problem is fixed. - Unused/already merged branches should be deleted.