Code

Merge branch 'maint'
[git.git] / Documentation / git-branch.txt
index aa1fdd402aa1771ab77af5e274a7e0452bbe8aa5..33bc31b0d4491169cdbfb06f3dc6c42ec84b1365 100644 (file)
@@ -8,8 +8,9 @@ git-branch - List, create, or delete branches
 SYNOPSIS
 --------
 [verse]
-'git-branch' [--color | --no-color] [-r | -a] [-v [--abbrev=<length>]]
-'git-branch' [-l] [-f] <branchname> [<start-point>]
+'git-branch' [--color | --no-color] [-r | -a]
+          [-v [--abbrev=<length> | --no-abbrev]]
+'git-branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>]
 'git-branch' (-m | -M) [<oldbranch>] <newbranch>
 'git-branch' (-d | -D) [-r] <branchname>...
 
@@ -25,6 +26,13 @@ It will start out with a head equal to the one given as <start-point>.
 If no <start-point> is given, the branch will be created with a head
 equal to that of the currently checked out branch.
 
+When a local branch is started off a remote branch, git can setup the
+branch so that gitlink:git-pull[1] will appropriately merge from that
+remote branch.  If this behavior is desired, it is possible to make it
+the default using the global `branch.autosetupmerge` configuration
+flag.  Otherwise, it can be chosen per-branch using the `--track`
+and `--no-track` options.
+
 With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
 If <oldbranch> had a corresponding reflog, it is renamed to match
 <newbranch>, and a reflog entry is created to remember the branch
@@ -33,7 +41,7 @@ to happen.
 
 With a `-d` or `-D` option, `<branchname>` will be deleted.  You may
 specify more than one branch for deletion.  If the branch currently
-has a ref log then the ref log will also be deleted. Use -r together with -d
+has a reflog then the reflog will also be deleted. Use -r together with -d
 to delete remote-tracking branches.
 
 
@@ -46,9 +54,9 @@ OPTIONS
        Delete a branch irrespective of its index status.
 
 -l::
-       Create the branch's ref log.  This activates recording of
-       all changes to made the branch ref, enabling use of date
-       based sha1 expressions such as "<branchname>@{yesterday}".
+       Create the branch's reflog.  This activates recording of
+       all changes made to the branch ref, enabling use of date
+       based sha1 expressions such as "<branchname>@\{yesterday}".
 
 -f::
        Force the creation of a new branch even if it means deleting
@@ -80,6 +88,9 @@ OPTIONS
        Alter minimum display length for sha1 in output listing,
        default value is 7.
 
+--no-abbrev::
+       Display the full sha1s in output listing rather than abbreviating them.
+
 <branchname>::
        The name of the branch to create or delete.
        The new branch name must pass all checks defined by
@@ -119,13 +130,13 @@ Delete unneeded branch::
 ------------
 $ git clone git://git.kernel.org/.../git.git my.git
 $ cd my.git
-$ git branch -d -r todo html man   <1>
-$ git branch -D test               <2>
+$ git branch -d -r origin/todo origin/html origin/man   <1>
+$ git branch -D test                                    <2>
 ------------
 +
-<1> delete remote-tracking branches "todo", "html", "man"
-<2> delete "test" branch even if the "master" branch does not have all
-commits from todo branch.
+<1> Delete remote-tracking branches "todo", "html", "man"
+<2> Delete "test" branch even if the "master" branch does not have all
+commits from test branch.
 
 
 Notes
@@ -147,4 +158,3 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 GIT
 ---
 Part of the gitlink:git[7] suite
-