Skip to content

Instantly share code, notes, and snippets.

@ABalanuta
Forked from dsci/gist:1347672
Last active December 11, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ABalanuta/b78eba862755d1e47370d66c1c463cfa to your computer and use it in GitHub Desktop.
Save ABalanuta/b78eba862755d1e47370d66c1c463cfa to your computer and use it in GitHub Desktop.
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:master
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:master -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment