Last active
December 23, 2015 02:49
-
-
Save LunaCodeGirl/6569076 to your computer and use it in GitHub Desktop.
git-flow cheat sheet. A paradigm for git management that helps manage branches and types of branches.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#May branch off from: develop | |
#Must merge back into: develop | |
#Branch naming convention: anything except master, develop, release-*, or hotfix-* | |
#Create Feature Branch | |
git checkout -b myfeature develop | |
#Incorporate finished feature branch into develop | |
git checkout develop | |
#Switched to branch 'develop' | |
git merge --no-ff myfeature | |
git branch -d myfeature | |
#Deleted branch myfeature (was 05e9557). | |
git push origin develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#May branch off from: master | |
#Must merge back into: develop and master | |
#Branch naming convention: hotfix-* | |
#creating release branch | |
git checkout -b hotfix-1.2.1 master | |
#finish release branch and add to master and dev branches | |
git checkout master | |
git merge --no-ff hotfix-1.2.1 | |
git tag -a 1.2.1 | |
git checkout develop | |
git merge --no-ff hotfix-1.2.1 | |
#deleting branch | |
git branch -d hotfix-1.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#May branch off from: develop | |
#Must merge back into: develop and master | |
#Branch naming convention: release-* | |
#creating release branch | |
git checkout -b release-1.2 develop | |
#finish release branch and add to master and dev branches | |
git checkout master | |
git merge --no-ff release-1.2 | |
git tag -a 1.2 | |
git checkout develop | |
git merge --no-ff release-1.2 | |
#deleting branch | |
git branch -d release-1.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment