Removing a patch from a commit in git

Dave Smith dave at
Wed Mar 16 20:54:15 MDT 2011

Using git, I have a local commit to which I accidentally added a patch. I would like to remove that patch now, and create a separate commit for that patch. I have not yet pushed my changes to origin.

I have been unable to find how to do this on Google. I can easily remove a patch from the index (git reset), but what about a patch that's already been committed? I've tried "git rebase -i HEAD^", which lets me amend and squash prior commits, but what about splitting a commit into two?



More information about the PLUG mailing list