Cheatography
https://cheatography.com
gitflow vs git raw commands
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Install
Linux |
|
Windows (cygwin) |
|
macOS (homebrew) |
brew install git-flow-avh
|
macOS (macports) |
port install git-flow-avh
|
Features / Create a branch
gitflow |
git |
git flow feature start MYFEATURE
|
git checkout -b feature/MYFEATURE develop
|
Features / Get latest from branch
gitflow |
git |
git flow feature pull origin MYFEATURE
|
git checkout feature/MYFEATURE
|
|
git pull --rebase origin feature/MYFEATURE
|
Features / push merged branch
gitflow |
git |
N/A |
|
|
git push origin :feature/MYFEATURE (if pushed) |
Hotfixes / create branch
gitflow |
git |
git flow hotfix start 1.2.1 [commit]
|
git checkout -b hotfix/1.2.1 [commit]
|
Hotfixes / Push merged branch
gitflow |
git |
N/A |
|
|
|
|
|
|
git push origin :hotfix/1.2.1 (if pushed) |
Releases / Get latest for branch
gitflow |
git |
N/A |
git checkout release/1.2.0
|
|
git pull --rebase origin release/1.2.0
|
Releases / Finalize
gitflow |
git |
git flow release finish 1.2.0
|
|
|
git merge --no-ff release/1.2.0
|
|
|
|
|
|
git merge --no-ff release/1.2.0
|
|
git branch -d release/1.2.0
|
|
|
Initialize
gitflow |
git |
|
|
|
git commit --allow-empty -m "Initial commit"
|
|
git checkout -b develop master
|
Connect to the remote repository
Features / Share a branch
gitflow |
git |
git flow feature publish MYFEATURE
|
git checkout feature/MYFEATURE
|
|
git push origin feature/MYFEATURE
|
Features / Finalize branch
gitflow |
git |
git flow feature finish MYFEATURE
|
|
|
git merge --no-ff feature/MYFEATURE
|
|
git branch -d feature/MYFEATURE
|
Hotfixes / Finalize branch
gitflow |
git |
git flow hotfix finish 1.2.1
|
|
|
git merge --no-ff hotfix/1.2.1
|
|
|
|
|
|
git merge --no-ff hotfix/1.2.1
|
|
git branch -d hotfix/1.2.1
|
Releases / Create a branch
gitflow |
git |
git flow release start 1.2.0
|
git checkout -b release/1.2.0 develop
|
Releases / Share branch
gitflow |
git |
git flow release publish 1.2.0
|
git checkout release/1.2.0
|
|
git push origin release/1.2.0
|
Releases / Push merged branc
gitflow |
git |
N/A |
|
|
|
|
|
|
git push origin :release/1.2.0 (if pushed) |
|