- https://www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow
- https://danielkummer.github.io/git-flow-cheatsheet/
- https://www.cheatography.com/mikesac/cheat-sheets/gitflow/
- source collaboration
- git flow = branching model
-
types of BRANCHES
master
develop
feature
= ALWAYS branched from and merged back intodevelop
release
= branched fromdevelop
, merged intodevelop
andmaster
hotfix
= branched frommaster
, merged intodevelop
andmaster
-
STEPS FOR A NEW FEATURE:
git checkout -b myfeature develop
git checkout develop
git merge --no-ff myfeature
git branch -d myfeature
git push origin develop
- STEPS FOR A RELEASE - EVERY COMMIT ON MASTER IS A NEW RELEASE
git checkout -b release-1.2 develop
- bump version to
1.2
(package.json
) git commit -a -m "Bumped version number to 1.2"
git checkout master
- git merge --no-ff release-1.2
- git push
git checkout develop
git merge --no-ff release-1.2
git push
- git tag -a 1.2
- git push tags
git branch -d release-1.2
- STEPS FOR A HOTFIX: same steps as for a release branch but
- use
hotfix
prefix:bugfix-1.2.1
// NB: semantic versioning
- use
-
ENVIRONMENTS:
LOCAL
,DEVELOPMENT
corresponds todevelop
branchACCEPTANCE
corresponds tomaster
branchPRODUCTION
corresponds toRELEASE TAG
-
bugfixes
are a special type of branch on a par with a feature branch:- split from and merged back into
develop
- split from and merged back into
-
hotfixes
are split from and merged back intomaster