SubmittingPatches: document how to reference previous commits
[gitweb.git] / Documentation / git-pull.txt
index 6ef8d599d31ac20982fa74f213b81494ceae162a..a62a2a615d0e0146d538213571d7f41bd02488cf 100644 (file)
@@ -42,6 +42,8 @@ Assume the following history exists and the current branch is
          A---B---C master on origin
         /
     D---E---F---G master
+       ^
+       origin/master in your repository
 ------------
 
 Then "`git pull`" will fetch and replay the changes from the remote
@@ -51,7 +53,7 @@ result in a new commit along with the names of the two parent commits
 and a log message from the user describing the changes.
 
 ------------
-         A---B---C remotes/origin/master
+         A---B---C origin/master
         /         \
     D---E---F---G---H master
 ------------
@@ -72,9 +74,6 @@ pulling or stash them away with linkgit:git-stash[1].
 OPTIONS
 -------
 
-Options meant for 'git pull' itself and the underlying 'git merge'
-must be given before the options meant for 'git fetch'.
-
 -q::
 --quiet::
        This is passed to both underlying git-fetch to squelch reporting of
@@ -97,19 +96,26 @@ must be given before the options meant for 'git fetch'.
 Options related to merging
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-include::merge-options.txt[]
-
 :git-pull: 1
 
+include::merge-options.txt[]
+
 -r::
---rebase::
-       Rebase the current branch on top of the upstream branch after
-       fetching.  If there is a remote-tracking branch corresponding to
-       the upstream branch and the upstream branch was rebased since last
-       fetched, the rebase uses that information to avoid rebasing
-       non-local changes.
+--rebase[=false|true|preserve|interactive]::
+       When true, rebase the current branch on top of the upstream
+       branch after fetching. If there is a remote-tracking branch
+       corresponding to the upstream branch and the upstream branch
+       was rebased since last fetched, the rebase uses that information
+       to avoid rebasing non-local changes.
++
+When set to preserve, rebase with the `--preserve-merges` option passed
+to `git rebase` so that locally created merge commits will not be flattened.
++
+When false, merge the current branch into the upstream branch.
++
+When `interactive`, enable the interactive mode of rebase.
 +
-See `pull.rebase`, `branch.<name>.rebase` and `branch.autosetuprebase` in
+See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in
 linkgit:git-config[1] if you want to make `git pull` always use
 `--rebase` instead of merging.
 +