Last active
August 29, 2015 14:10
-
-
Save wulab/4fef80464723c71b36ba to your computer and use it in GitHub Desktop.
A way to get hotfix branch to master when staging has pending commits
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
# backup current staging | |
$ git checkout staging | |
$ git branch tmp | |
# reset to master and merge hotfix | |
$ git reset --hard master | |
$ git merge hotfix/xxx | |
$ git push --force origin staging | |
# deploy to production | |
$ git checkout master | |
$ git merge staging | |
$ git push origin master | |
# merge back previous staging | |
$ git checkout staging | |
$ git merge tmp | |
$ git push origin staging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment