help on git revert

Auke Kok sofar at foo-projects.org
Mon Jul 27 07:41:42 UTC 2009


hong zhang wrote:
> 
> 
> --- On Sun, 7/26/09, Pavel Roskin <proski at gnu.org> wrote:
> 
>> From: Pavel Roskin <proski at gnu.org>
>> You can use "git mergetool" to resolve the conflicts. 
>> Or you can use
>> "git diff" to extract the reverted patch and apply it
>> manually:
>>
>> git diff-tree -p f3144600..f3144600^ >reverted.diff
>> patch -p1 -i reverted.diff
> 
> After applying "patch -p1 -i reverted.diff" saves some to *.rej file but it has 2500 lines. It is too much for manual changes. Any better way?


really, *please* ask this kind of question on the git mailinglist...

And no, there is no way to make it easier. if you want to revert a 
really old changeset, you're out of luck and need to do the hard work, 
or just revert ALL the changes that were merged after that changeset.

Auke




More information about the devel mailing list