Skip to content

Instantly share code, notes, and snippets.

@sathed
Created October 24, 2019 16:49
Show Gist options
  • Save sathed/97446fa07bb3f9e6fac79f21a2fefd87 to your computer and use it in GitHub Desktop.
Save sathed/97446fa07bb3f9e6fac79f21a2fefd87 to your computer and use it in GitHub Desktop.
Revert commits on published branches
# Range of commits
# git revert --no-edit <first_bad_commit_hash>..<last_bad_commit_hash>
git revert --no-edit 1abeb478e11..e272b5a3680
# Single commit
# git revert --no-edit <bad_commit_hash>
git refert --no-edit e272b5a3680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment