Last active
June 19, 2018 19:27
-
-
Save thomaslaurenson/bf04f3cd6aac133c744eea21e8f8d6dd to your computer and use it in GitHub Desktop.
Remove the last commit to a specifc git repository
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
# Remove last commit (completely) | |
git reset --hard HEAD~1 | |
# Remove specific commit (completely) | |
get reset <commit_hash> | |
# Now push with force! | |
git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment