git-kill: rewrite history removing a commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

#!/bin/sh

commit=$1;
#git-rev-list $commit.. 
revlist=`git-rev-list $commit.. | tac`
git reset --hard $commit
git reset --hard HEAD~1
for rev in $revlist
do
	git-cherry-pick $rev
done
-- 
MST
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]