Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@talha-ah
Copy link

talha-ah commented Apr 16, 2021

Thanks <3

@dogukaneren
Copy link

dogukaneren commented Jun 13, 2021

Thank you very much <3

@rokyhu
Copy link

rokyhu commented Jun 14, 2021

🤟

@bobbi-henderson
Copy link

bobbi-henderson commented Jul 9, 2021

oh my gosh, thank you so much!

@Ngomana
Copy link

Ngomana commented Aug 27, 2021

💯💯💯💯

@Palak-Srivastava
Copy link

Palak-Srivastava commented Oct 13, 2021

How do I delete commit directly on web interface?

@tsarbuig
Copy link

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