Skip to content

Instantly share code, notes, and snippets.

@thomaslaurenson
Last active June 19, 2018 19:27
Show Gist options
  • Save thomaslaurenson/bf04f3cd6aac133c744eea21e8f8d6dd to your computer and use it in GitHub Desktop.
Save thomaslaurenson/bf04f3cd6aac133c744eea21e8f8d6dd to your computer and use it in GitHub Desktop.
Remove the last commit to a specifc git repository
# 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