Created
October 27, 2015 00:43
-
-
Save miqui/71cd8454ad8e906d9c3d to your computer and use it in GitHub Desktop.
git tips - 2
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
// Create a new branch and fetch frome remote branch | |
$ git checkout -b hotfix origin/hotfix | |
// Create a branch based one commit | |
// Fix branch | |
$ git checkout -b hotfix 7bda10c6488835f4c54079cec78cc539a0c152c6 | |
$ git push origin hotfix | |
// Create a new branch hotfix based on master | |
$ git checkout -b hotfix master | |
// Merge branch hotfix ->master | |
$ git checkout master | |
$ git merge --no-ff hotfix | |
// Delete branch local and remote | |
$ git branch -d hotfix | |
$ git push origin :hotfix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment