author | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Jul 2008 07:16:38 +0000 (00:16 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Jul 2008 20:12:56 +0000 (13:12 -0700) | ||
commit | 22e407951ef2572c1e68a39364fd3c4b649a3495 | |
tree | 204139801028c6c7e8e17f2ff116a17e9c96c601 | tree | snapshot |
parent | 44701c67fd1d5d771b440c8646b7b268d4f1402d | commit | diff |
Teach "am" and "rebase" to mark the original position with ORIG_HEAD
"merge" and "reset" leave the original point in history in ORIG_HEAD,
which makes it easy to go back to where you were before you inflict a
major damage to your history and realize that you do not like the result
at all. These days with reflog, we technically do not need to use
ORIG_HEAD, but it is a handy way nevertheless.
This teaches "am" and "rebase" (all forms --- the vanilla one that uses
"am" as its backend, "-m" variant that cherry-picks, and "--interactive")
to do the same.
The original idea and a partial implementation to do this only for "rebase
-m" was by Brian Gernhardt; this extends on his idea.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"merge" and "reset" leave the original point in history in ORIG_HEAD,
which makes it easy to go back to where you were before you inflict a
major damage to your history and realize that you do not like the result
at all. These days with reflog, we technically do not need to use
ORIG_HEAD, but it is a handy way nevertheless.
This teaches "am" and "rebase" (all forms --- the vanilla one that uses
"am" as its backend, "-m" variant that cherry-picks, and "--interactive")
to do the same.
The original idea and a partial implementation to do this only for "rebase
-m" was by Brian Gernhardt; this extends on his idea.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | diff | blob | history | |
git-rebase--interactive.sh | diff | blob | history | |
git-rebase.sh | diff | blob | history |