From: Junio C Hamano Date: Wed, 31 Jan 2007 20:26:52 GMT Subject: Re: git-kill: rewrite history removing a commit Message-ID: <7v7iv3uelv.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070131195533.GE21097@mellanox.co.il> "Michael S. Tsirkin" writes: > Below is a simple script that rewrites history reverting a single commit. > This differs from git-revert in that a commit is completely removed, > and is especially useful before one has published a series of > commits. > > Do you find this useful? Comments? > Drop me a line. "Do you find this useful" is a loaded question. I do it all the time with git-rebase, so the need to remove a botched commit from the history and rebuild the remainder is certainly there, meaning "what your patch does IS useful". I do it all the time with git-rebase, so I personally do not need a new tool to do this, meaning "your patch is not useful to me". When I find master~8 and master~9 to be undesirable, I would do: $ git rebase --onto master~10 master~8 which rebuilds master~7 and onward on top of master~10, thereby dropping two commits.