[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [githax/master] Clarify 'git pull' vs. fetch & merge/rebase



Author: Marcus Griep <marcus@xxxxxxxx>
Date: Sun, 26 Apr 2009 16:15:25 -0600
Subject: Clarify 'git pull' vs. fetch & merge/rebase
Commit: addaf3f085b576a36cb2f92e0830d5766ff1327f

The howto offers `git pull` as the default mode of operation, but
with local changes this may not have the intended behavior. Clarify
this and show how to use fetch & rebase instead of pull.

Signed-off-by: Marcus Griep <marcus@xxxxxxxx>
---
 doc/Howto-thandy.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/doc/Howto-thandy.txt b/doc/Howto-thandy.txt
index 98ee4ee..f542ca5 100644
--- a/doc/Howto-thandy.txt
+++ b/doc/Howto-thandy.txt
@@ -234,6 +234,15 @@ history, and the head of the 'master' branch now just points at them.
 
 If there are changes, git will try to merge for you.
 
+`git pull` is essentially just `git fetch` followed by `git merge`. If you
+already have work that is based on a remote branch, you may want to rebase
+instead of letting `git merge` create an implicit merge commit:
+
+-----
+% git fetch origin
+% git rebase origin/master
+-----
+
 Now, what should we do about our local ftp branch?  It's still based on
 the pre-pull  version.  We have a few choices.
 
-- 
1.5.6.5