Merge branch 'fc/maint-format-patch-pathspec-dashes'
[gitweb.git] / Documentation / git-fetch.txt
index 334744c2eb2e7cfc992d3e5ceb6b1a5d807e4969..9b9e5686e4d4e1ca41bba1c5a50715463975cad1 100644 (file)
@@ -12,6 +12,8 @@ SYNOPSIS
 
 'git fetch' <options> <group>
 
+'git fetch' --multiple <options> [<repository> | <group>]...
+
 'git fetch' --all <options>
 
 
@@ -45,6 +47,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]