Skip to main content

git: remove specific commit

To delete a special commit look for it's id (COMMIT) and do:

git rebase --onto COMMIT^ COMMIT

It's not important if you removed that problematic text in the commit after (COMMIT+1). The whole diff from COMMIT-1 to COMMIT will be deleted.