]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-branch.txt
Merge branch 'po/doc-branch' into maint
[thirdparty/git.git] / Documentation / git-branch.txt
index c57f6a15c6cbea10b842172370be4456fbd09b5d..d9325e2145441520c706c8d0a369d559e841eb19 100644 (file)
@@ -10,6 +10,7 @@ SYNOPSIS
 [verse]
 'git branch' [--color[=<when>] | --no-color]
        [-v [--abbrev=<length> | --no-abbrev]]
+       [--show-current]
        [--column[=<options>] | --no-column] [--sort=<key>]
        [(--merged | --no-merged) [<commit>]]
        [--contains [<commit]] [--no-contains [<commit>]]
@@ -51,7 +52,11 @@ argument is missing it defaults to `HEAD` (i.e. the tip of the current
 branch).
 
 The command's second form creates a new branch head named <branchname>
-which points to the current `HEAD`, or <start-point> if given.
+which points to the current `HEAD`, or <start-point> if given. As a
+special case, for <start-point>, you may use `"A...B"` as a shortcut for
+the merge base of `A` and `B` if there is exactly one merge base. You
+can leave out at most one of `A` and `B`, in which case it defaults to
+`HEAD`.
 
 Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
@@ -168,6 +173,10 @@ This option is only applicable in non-verbose mode.
        branch --list 'maint-*'`, list only the branches that match
        the pattern(s).
 
+--show-current::
+       Print the name of the current branch. In detached HEAD state,
+       nothing is printed.
+
 -v::
 -vv::
 --verbose::