Last active
April 20, 2018 11:33
-
-
Save alesegdia/1e9b2326d7055ddf0e73cd53e6041f15 to your computer and use it in GitHub Desktop.
Git cheats
This file contains hidden or 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
# undo last N commits | |
git reset --hard HEAD~3 | |
git push origin HEAD --force | |
# push to several remotes | |
git remote add all origin-host:path/proj.git | |
git remote set-url --add all a-host:path/proj.git | |
git remote set-url --add all b-host:path/proj.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment