author | Junio C Hamano <gitster@pobox.com> | |
Tue, 23 Oct 2007 20:33:26 +0000 (13:33 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 27 Oct 2007 06:28:28 +0000 (23:28 -0700) | ||
commit | 7791ecbc62b792b3eaa6d722b6dadcea4d0f322d | |
tree | 08ff76b3a227d4bc0395473ad103e82a00355ea3 | tree | snapshot |
parent | 85b00455057c19a993eeaee2606af550b8d4de10 | commit | diff |
revert/cherry-pick: work on merge commits as well
Usually you cannot revert a merge because you do not know which
side of the merge should be considered the mainline (iow, what
change to reverse).
With this patch, cherry-pick and revert learn -m (--mainline)
option that lets you specify the parent number (starting from 1)
of the mainline, so that you can:
git revert -m 1 $merge
to reverse the changes introduced by the $merge commit relative
to its first parent, and:
git cherry-pick -m 2 $merge
to replay the changes introduced by the $merge commit relative
to its second parent.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Usually you cannot revert a merge because you do not know which
side of the merge should be considered the mainline (iow, what
change to reverse).
With this patch, cherry-pick and revert learn -m (--mainline)
option that lets you specify the parent number (starting from 1)
of the mainline, so that you can:
git revert -m 1 $merge
to reverse the changes introduced by the $merge commit relative
to its first parent, and:
git cherry-pick -m 2 $merge
to replay the changes introduced by the $merge commit relative
to its second parent.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-cherry-pick.txt | diff | blob | history | |
Documentation/git-revert.txt | diff | blob | history | |
builtin-revert.c | diff | blob | history | |
git-compat-util.h | diff | blob | history |