X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-pull.txt;h=737894390d8033bf470b3bfe3aeade858f38717e;hb=340814636dde3cbd2e461b12f9ae832d2100766a;hp=d4d26afea0fef29cd3e0ca2e7bb89f71d08d4c22;hpb=0ebd5d7186237663a642397214232e5fe2fba21d;p=git.git diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index d4d26afea..737894390 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -15,6 +15,7 @@ DESCRIPTION ----------- Runs `git-fetch` with the given parameters, and calls `git-merge` to merge the retrieved head(s) into the current branch. +With `--rebase`, calls `git-rebase` instead of `git-merge`. Note that you can use `.` (current directory) as the to pull from the local repository -- this is useful @@ -25,6 +26,24 @@ OPTIONS ------- include::merge-options.txt[] +:git-pull: 1 + +\--rebase:: + 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. To make this the default + for branch ``, set configuration `branch..rebase` + to `true`. ++ +*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 +unless you have read linkgit:git-rebase[1] carefully. + +\--no-rebase:: + Override earlier \--rebase. + include::fetch-options.txt[] include::pull-fetch-param.txt[] @@ -33,16 +52,6 @@ include::urls-remotes.txt[] include::merge-strategies.txt[] -\--rebase:: - Instead of a merge, perform a rebase after fetching. - *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 - unless you have read gitlink:git-rebase[1] carefully. - -\--no-rebase:: - Override earlier \--rebase. - DEFAULT BEHAVIOUR ----------------- @@ -106,7 +115,7 @@ git pull, git pull origin:: current branch. Normally the branch merged in is the HEAD of the remote repository, but the choice is determined by the branch..remote and - branch..merge options; see gitlink:git-config[1] + branch..merge options; see linkgit:git-config[1] for details. git pull origin next:: @@ -153,12 +162,12 @@ The final command then merges the newly fetched `tmp` into master. If you tried a pull which resulted in a complex conflicts and would want to start over, you can recover with -gitlink:git-reset[1]. +linkgit:git-reset[1]. SEE ALSO -------- -gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-config[1] +linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1] Author @@ -174,4 +183,4 @@ Junio C Hamano and the git-list . GIT --- -Part of the gitlink:git[7] suite +Part of the linkgit:git[7] suite