diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-15 16:37:58 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-15 16:37:58 -0800 |
commit | 077f3d405a4d366456c82fb9a09abef06edcb88d (patch) | |
tree | 88224afabe19dd9af5cd9544dfdda9c753ed1263 /Documentation/git-fetch.txt | |
parent | 04b35775353e2ccc7064dc470b1a8e3f0c45009b (diff) | |
parent | d504f6975d34025ed3b5478b657789410b52cdb1 (diff) | |
download | git-077f3d405a4d366456c82fb9a09abef06edcb88d.tar.gz |
Merge branch 'cb/doc-fetch-pull-merge' into maint
* cb/doc-fetch-pull-merge:
modernize fetch/merge/pull examples
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] |