-
-
Save Max95Cohen/66fccb64209ca80a2b35ff66d1f97ffa to your computer and use it in GitHub Desktop.
git tips
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
Local and remote updates | |
local-pc: git reset --hard HEAD~33 | |
local-pc: git push origin +HEAD:master | |
remote-pc: git reset --hard HEAD~33 | |
remote-pc: git pull | |
Reset last push commit | |
git push -f origin last_known_good_commit:branch_name | |
Remote all commit and set to current HEAD | |
git push origin +HEAD^:<branch> | |
Reset last commits local and remote | |
git reset --hard <commit> | |
git checkout -B <branch> origin/<branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment