help on git revert

Pavel Roskin proski at
Sun Jul 26 20:21:03 UTC 2009

On Sun, 2009-07-26 at 10:54 -0700, hong zhang wrote:
> List,
> I need help on my git revert. 

You are probably better off asking it in the list about git.

> But "git revert f3144600536155297b26634f7e1c30a9abbdfb36" cannot be done. See following
> > git revert f3144600536155297b26634f7e1c30a9abbdfb36
> Auto-merged net/mac80211/cfg.c
> CONFLICT (content): Merge conflict in net/mac80211/cfg.c
> Auto-merged net/mac80211/ieee80211_i.h
> CONFLICT (content): Merge conflict in net/mac80211/ieee80211_i.h
> Auto-merged net/mac80211/iface.c
> Auto-merged net/mac80211/mlme.c
> CONFLICT (content): Merge conflict in net/mac80211/mlme.c
> Auto-merged net/mac80211/rx.c
> Automatic revert failed.  After resolving the conflicts,
> mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result.
> I need help on how to make this reverse done right.

Reverting this commit means reverting the changes made by the commit.
This conflicts with subsequent changes.

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

Pavel Roskin

More information about the devel mailing list