From c85c79279df2c8a583d95449d1029baba41f8660 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 26 Jan 2008 18:04:37 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-pull.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation/git-pull.txt') diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index f9f1e0d30b..4cc633a5ec 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -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 -- cgit v1.2.1