Skip to content

Instantly share code, notes, and snippets.

@Gundars
Last active September 8, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gundars/e016730f15bdcaa15566 to your computer and use it in GitHub Desktop.
Save Gundars/e016730f15bdcaa15566 to your computer and use it in GitHub Desktop.
add new feature with PRs + cherry pick into patch to old release
git checkout master
git pull origin master
git checkout -b <feature branch>
# make changes
git add <file>
# this will create commit with hash <ABC>
git commit -m"Message"
git push origin <feature branch>
# make PRs to test and master, then:
git fetch --all --prune
git checkout -b <release branch> origin/<release branch>
# make a patch branch for release branch 1.0.1-patch
git checkout -b <release branch>-patch
# Do not align to master - <ABC> is last feature branch commits hash
git cherry-pick <ABC>
git push origin <release branch>-patch
# and cut release from branch <release branch>-patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment