diff options
author | Clemens Buchacher <drizzd@aon.at> | 2009-10-21 19:21:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-21 14:20:50 -0700 |
commit | d504f6975d34025ed3b5478b657789410b52cdb1 (patch) | |
tree | 15a1740788917b9242b65a911f312edfbeaf8e5a /Documentation/git-fetch.txt | |
parent | GIT 1.6.5 (diff) | |
download | tgif-d504f6975d34025ed3b5478b657789410b52cdb1.tar.xz |
modernize fetch/merge/pull examples
The "git pull" documentation has examples which follow an outdated
style. Update the examples to use "git merge" where appropriate and
move the examples to the corresponding manpages.
Furthermore,
- show that pull is equivalent to fetch and merge, which is still a
frequently asked question,
- explain the default fetch refspec.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-fetch.txt')
-rw-r--r-- | Documentation/git-fetch.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index d3164c5c88..f2483d624e 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -37,6 +37,35 @@ include::pull-fetch-param.txt[] include::urls-remotes.txt[] + +EXAMPLES +-------- + +* Update the remote-tracking branches: ++ +------------------------------------------------ +$ git fetch origin +------------------------------------------------ ++ +The above command copies all branches from the remote refs/heads/ +namespace and stores them to the local refs/remotes/origin/ namespace, +unless the branch.<name>.fetch option is used to specify a non-default +refspec. + +* Using refspecs explicitly: ++ +------------------------------------------------ +$ git fetch origin +pu:pu maint:tmp +------------------------------------------------ ++ +This updates (or creates, as necessary) branches `pu` and `tmp` in +the local repository by fetching from the branches (respectively) +`pu` and `maint` from the remote repository. ++ +The `pu` branch will be updated even if it is does not fast-forward, +because it is prefixed with a plus sign; `tmp` will not be. + + SEE ALSO -------- linkgit:git-pull[1] |