Skip to content

Instantly share code, notes, and snippets.

@tyrelsouza
Created December 15, 2016 22:10
Show Gist options
  • Save tyrelsouza/cc944c057f5110f42373f8909257ed20 to your computer and use it in GitHub Desktop.
Save tyrelsouza/cc944c057f5110f42373f8909257ed20 to your computer and use it in GitHub Desktop.
Undo a commit FORCEFULLY.
#!/bin/bash
git tag temp$RANDOM
git reset --hard HEAD^
git push --force
echo "There. I fixed your stupid mistake Tyrel"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment