Last active
August 17, 2017 01:35
-
-
Save wongjiahau/ba712f8e55d9c3dd38be68fdb47b43ab to your computer and use it in GitHub Desktop.
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
#Delete last commit at remote (e.g. GitHub) | |
git push -f origin HEAD^:master | |
#Delete a particular commit at local git | |
git reset --hard <sha1-commit-id> | |
#Deleting last commit locally (HEAD~1 means last commit) | |
git reset --hard HEAD~1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment