Skip to content

Instantly share code, notes, and snippets.

@dsci
Created November 8, 2011 12:52
Show Gist options
  • Select an option

  • Save dsci/1347672 to your computer and use it in GitHub Desktop.

Select an option

Save dsci/1347672 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^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@Palak-Srivastava
Copy link
Copy Markdown

How do I delete commit directly on web interface?

@tsarbuig
Copy link
Copy Markdown

tsarbuig commented Jan 1, 2022

amazing, thanks bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment