aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-12-22 23:37:24 +0100
committerJunio C Hamano <junkio@cox.net>2005-12-22 16:35:37 -0800
commite6c310fd0d7384973efc6b1d5999a5e8a5b2f3bd (patch)
treec42a1205f99f13ed446054a2a316729f53942e41 /Documentation
parent356bece0a2725818191b12f6e991490d52baa1d1 (diff)
downloadgit-e6c310fd0d7384973efc6b1d5999a5e8a5b2f3bd.tar.gz
git-e6c310fd0d7384973efc6b1d5999a5e8a5b2f3bd.tar.xz
git-clone: Support changing the origin branch with -o
Earlier, git-clone stored upstream's master in the branch named 'origin', possibly overwriting an existing such branch. Now you can change it by calling git-clone with '-o <other_name>'. [jc: added ref format check, subdirectory safety, documentation and usage string.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-clone.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 8410a6d38..f943f267d 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -8,7 +8,7 @@ git-clone - Clones a repository.
SYNOPSIS
--------
-'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>] <repository> [<directory>]
+'git-clone' [-l [-s]] [-q] [-n] [-o <name>] [-u <upload-pack>] <repository> [<directory>]
DESCRIPTION
-----------
@@ -56,6 +56,13 @@ OPTIONS
-n::
No checkout of HEAD is performed after the clone is complete.
+-o <name>::
+ Instead of using the branch name 'origin' to keep track
+ of the upstream repository, use <name> instead. Note
+ that the shorthand name stored in `remotes/origin` is
+ not affected, but the local branch name to pull the
+ remote `master` branch into is.
+
--upload-pack <upload-pack>::
-u <upload-pack>::
When given, and the repository to clone from is handled