fixing a bad commit with git-svn

Posted by jacqui maher on March 25, 2008 at 05:28 PM

I do this fairly often, mostly because I haven’t migrated all of our svn pre-commit hooks to git. I really ought to do that..

$ git tag bad 012345 # or any other valid git reference
$ git checkout bad
$ # make changes here and update the index
$ git add
$ git commit –amend
$ git rebase –onto HEAD bad master # where ‘master’ is the branch in question
$ git tag -d bad

thanks to sebastian delmont for this.

Comments: 3 (view/add your own) Tags: git, svn