pull --rebase: be cleverer with rebased upstream branches
When the upstream branch is tracked, we can detect if that branch was rebased since it was last fetched. Teach git to use that information to rebase from the old remote head onto the new remote head. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e509db990b
commit
c85c79279d
@ -35,7 +35,11 @@ include::urls-remotes.txt[]
|
||||
include::merge-strategies.txt[]
|
||||
|
||||
\--rebase::
|
||||
Instead of a merge, perform a rebase after fetching.
|
||||
Instead of a merge, perform a rebase after fetching. If
|
||||
there is a remote ref for the upstream branch, and this branch
|
||||
was rebased since last fetched, the rebase uses that information
|
||||
to avoid rebasing non-local changes.
|
||||
|
||||
*NOTE:* This is a potentially _dangerous_ mode of operation.
|
||||
It rewrites history, which does not bode well when you
|
||||
published that history already. Do *not* use this option
|
||||
|
Reference in New Issue
Block a user