git-p4: document and test clone --branch
[gitweb.git] / Documentation / git-p4.txt
index befb21704a8f49fda0a8d8794b542d4325c32e8d..9305e099874b259d3aa3ebfd6c7f2a47b73948fc 100644 (file)
@@ -178,7 +178,15 @@ subsequent 'sync' operations.
 --branch <branch>::
        Import changes into given branch.  If the branch starts with
        'refs/', it will be used as is, otherwise the path 'refs/heads/'
-       will be prepended.  The default branch is 'master'.
+       will be prepended.  The default branch is 'master'.  If used
+       with an initial clone, no HEAD will be checked out.
++
+This example imports a new remote "p4/proj2" into an existing
+git repository:
+----
+    $ git init
+    $ git p4 sync --branch=refs/remotes/p4/proj2 //depot/proj2
+----
 
 --detect-branches::
        Use the branch detection algorithm to find new paths in p4.  It is