Last active
November 26, 2016 22:19
-
-
Save daniel-williams/b9ec09e4d7e07981fcb47e792079f0ee to your computer and use it in GitHub Desktop.
Gokking the Git
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
# deletes the local remote-tracking branch, but not the actual remote branch | |
git branch -rd origin/[branch name] | |
# To delete the actual remote branch | |
git push origin --delete [branch name] | |
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
# will overwrite any existing master branch | |
git push -f origin master |
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
# push local branch to remote with tracking | |
git push -u origin [branch name] | |
# for existing branch | |
git branch -u [origin]/[branch name] |
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
git merge --squash [branch name] | |
git commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment