From b85e6c5f8107c802c627981e044e680999884c5f Mon Sep 17 00:00:00 2001 From: Nanako Shiraishi Date: Sat, 22 Aug 2009 09:45:18 +0900 Subject: Documentation: consistently refer to check-ref-format Change the placeholder to in the SYNOPSIS section of git-tag documentation, and describe it in the OPTIONS section in a way similar to how documentation for git-branch does. Add SEE ALSO section to list the other documentation pages these two pages refer to. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index ae201deb7a..99988872eb 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -209,6 +209,12 @@ but different purposes: - `--no-merged` is used to find branches which are candidates for merging into HEAD, since those branches are not fully contained by HEAD. +SEE ALSO +-------- +linkgit:git-check-ref-format[1], +linkgit:git-fetch[1], +linkgit:git-remote[1]. + Author ------ Written by Linus Torvalds and Junio C Hamano -- cgit v1.2.3 From f7aec129fa78e39e200352502377f57952516f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 29 Aug 2009 11:05:00 +0200 Subject: UI consistency: allow --force for where -f means force git branch, checkout, clean, mv and tag all have an option -f to override certain checks. This patch makes them accept the long option --force as a synonym. While we're at it, document that checkout support --quiet as synonym for its short option -q. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 99988872eb..aad71dc59a 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -76,6 +76,7 @@ OPTIONS based sha1 expressions such as "@\{yesterday}". -f:: +--force:: Reset to if exists already. Without `-f` 'git-branch' refuses to change an existing branch. -- cgit v1.2.3 From 58d2c961b310d9366dd193f2d95d7eae56edecec Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:18:58 -0500 Subject: Documentation: branch: update --merged description Update the documentation for --merged and --no-merged to explain the meaning of the optional parameter introduced in commit 049716b (branch --merged/--no-merged: allow specifying arbitrary commit, 2008-07-08). Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index aad71dc59a..f34911fe9a 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -134,11 +134,13 @@ start-point is either a local or remote branch. --contains :: Only list branches which contain the specified commit. ---merged:: - Only list branches which are fully contained by HEAD. +--merged []:: + Only list branches whose tips are reachable from the + specified commit (HEAD if not specified). ---no-merged:: - Do not list branches which are fully contained by HEAD. +--no-merged []:: + Only list branches whose tips are not reachable from the + specified commit (HEAD if not specified). :: The name of the branch to create or delete. -- cgit v1.2.3 From bb35f35e67ed2fdfce1892cc9d55827b90fcb775 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 13:34:08 -0500 Subject: Documentation: clarify branch creation The documentation seems to assume that the starting point for a new branch is the tip of an existing (ordinary) branch, but that is not the most common case. More often, "git branch" is used to begin a branch from a remote-tracking branch, a tag, or an interesting commit (e.g. origin/pu^2). Clarify the language so it can apply to these cases. Thanks to Sean Estabrooks for the wording. Also add a pointer to the user's manual for the bewildered. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index f34911fe9a..0e836809c2 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -30,10 +30,8 @@ commit) will be listed. With `--no-merged` only branches not merged into the named commit will be listed. If the argument is missing it defaults to 'HEAD' (i.e. the tip of the current branch). -In the command's second form, a new branch named will be created. -It will start out with a head equal to the one given as . -If no is given, the branch will be created with a head -equal to that of the currently checked out branch. +The command's second form creates a new branch head named +which points to the current 'HEAD', or if given. Note that this will create the new branch, but it will not switch the working tree to it; use "git checkout " to switch to the @@ -149,9 +147,9 @@ start-point is either a local or remote branch. may restrict the characters allowed in a branch name. :: - The new branch will be created with a HEAD equal to this. It may - be given as a branch name, a commit-id, or a tag. If this option - is omitted, the current branch is assumed. + The new branch head will point to this commit. It may be + given as a branch name, a commit-id, or a tag. If this + option is omitted, the current HEAD will be used instead. :: The name of an existing branch to rename. @@ -216,7 +214,9 @@ SEE ALSO -------- linkgit:git-check-ref-format[1], linkgit:git-fetch[1], -linkgit:git-remote[1]. +linkgit:git-remote[1], +link:user-manual.html#what-is-a-branch[``Understanding history: What is +a branch?''] in the Git User's Manual. Author ------ -- cgit v1.2.3 From 0b444cdb19bcfcc7f59b7b00783cbfbbc5ddcf63 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 10 Jan 2010 00:33:00 +0100 Subject: Documentation: spell 'git cmd' without dash throughout The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH. --- Documentation/git-branch.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 0e836809c2..44144d5a0d 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -38,7 +38,7 @@ working tree to it; use "git checkout " to switch to the new branch. When a local branch is started off a remote branch, git sets up the -branch so that 'git-pull' will appropriately merge from +branch so that 'git pull' will appropriately merge from the remote branch. This behavior may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options. @@ -55,7 +55,7 @@ has a reflog then the reflog will also be deleted. Use -r together with -d to delete remote-tracking branches. Note, that it only makes sense to delete remote-tracking branches if they no longer exist -in the remote repository or if 'git-fetch' was configured not to fetch +in the remote repository or if 'git fetch' was configured not to fetch them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a way to clean up all obsolete remote-tracking branches. @@ -76,7 +76,7 @@ OPTIONS -f:: --force:: Reset to if exists - already. Without `-f` 'git-branch' refuses to change an existing branch. + already. Without `-f` 'git branch' refuses to change an existing branch. -m:: Move/rename a branch and the corresponding reflog. -- cgit v1.2.3 From 4fc500667636c4ada592a40c4d11ce0560c43c0d Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Mon, 18 Jan 2010 22:44:11 +0200 Subject: 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 Signed-off-by: Matthieu Moy Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 0e836809c2..a0d6a7a649 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= | --no-abbrev]] [(--merged | --no-merged | --contains) []] -'git branch' [--track | --no-track] [-l] [-f] [] +'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] 'git branch' (-m | -M) [] 'git branch' (-d | -D) [-r] ... @@ -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 :: Only list branches which contain the specified commit. -- cgit v1.2.3