author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 5 Jan 2009 17:35:16 +0000 (18:35 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Jan 2009 07:03:36 +0000 (23:03 -0800) | ||
commit | 190f53232d1e92a57843df90e889bcfea39620d3 | |
tree | 220a1ac3c0fdced275e983644ed3de935c240dfd | tree | snapshot |
parent | d8fab0234d6db440a71f38f8538dbdefbbdfd077 | commit | diff |
rebase: learn to rebase root commit
Teach git-rebase a new option --root, which instructs it to rebase the
entire history leading up to <branch>. This option must be used with
--onto <newbase>, and causes commits that already exist in <newbase>
to be skipped. (Normal operation skips commits that already exist in
<upstream> instead.)
One possible use-case is with git-svn: suppose you start hacking
(perhaps offline) on a new project, but later notice you want to
commit this work to SVN. You will have to rebase the entire history,
including the root commit, on a (possibly empty) commit coming from
git-svn, to establish a history connection. This previously had to
be done by cherry-picking the root commit manually.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Teach git-rebase a new option --root, which instructs it to rebase the
entire history leading up to <branch>. This option must be used with
--onto <newbase>, and causes commits that already exist in <newbase>
to be skipped. (Normal operation skips commits that already exist in
<upstream> instead.)
One possible use-case is with git-svn: suppose you start hacking
(perhaps offline) on a new project, but later notice you want to
commit this work to SVN. You will have to rebase the entire history,
including the root commit, on a (possibly empty) commit coming from
git-svn, to establish a history connection. This previously had to
be done by cherry-picking the root commit manually.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh | diff | blob | history | |
t/t3412-rebase-root.sh | [new file with mode: 0755] | blob |