Code

Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitk
[git.git] / Documentation / git-branch.txt
index 3ea3b8063520fe2a6f97b767d5f2e2ac05d147d9..bb6b57dc2d00e38fc1d0128fe02fc771a1f83086 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 [verse]
 'git-branch' [--color | --no-color] [-r | -a]
           [-v [--abbrev=<length> | --no-abbrev]]
-'git-branch' [-l] [-f] <branchname> [<start-point>]
+'git-branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>]
 'git-branch' (-m | -M) [<oldbranch>] <newbranch>
 'git-branch' (-d | -D) [-r] <branchname>...
 
@@ -26,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
@@ -34,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.
 
 
@@ -47,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
@@ -129,7 +136,7 @@ $ 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.
+commits from test branch.
 
 
 Notes
@@ -151,4 +158,3 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 GIT
 ---
 Part of the gitlink:git[7] suite
-