summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorIlari Liusvaara <ilari.liusvaara@elisanet.fi>2010-01-18 20:44:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-19 01:09:32 (GMT)
commit4fc500667636c4ada592a40c4d11ce0560c43c0d (patch)
tree78c07862f09c2b89339a53a287a4f5540dc73a4c /Documentation
parentff6d26a0e1d8fad775010fa3b689c0c027da8bb0 (diff)
downloadgit-4fc500667636c4ada592a40c4d11ce0560c43c0d.zip
git-4fc500667636c4ada592a40c4d11ce0560c43c0d.tar.gz
git-4fc500667636c4ada592a40c4d11ce0560c43c0d.tar.bz2
Add branch --set-upstream
Add --set-upstream option to branch that works like --track, except that when branch exists already, its upstream info is changed without changing the ref value. Based-on-patch-from: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-branch.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 0e83680..a0d6a7a 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -11,7 +11,7 @@ SYNOPSIS
'git branch' [--color | --no-color] [-r | -a]
[-v [--abbrev=<length> | --no-abbrev]]
[(--merged | --no-merged | --contains) [<commit>]]
-'git branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>]
+'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (-m | -M) [<oldbranch>] <newbranch>
'git branch' (-d | -D) [-r] <branchname>...
@@ -129,6 +129,12 @@ start-point is either a local or remote branch.
Do not set up "upstream" configuration, even if the
branch.autosetupmerge configuration variable is true.
+--set-upstream::
+ If specified branch does not exist yet or if '--force' has been
+ given, acts exactly like '--track'. Otherwise sets up configuration
+ like '--track' would when creating the branch, except that where
+ branch points to is not changed.
+
--contains <commit>::
Only list branches which contain the specified commit.