summaryrefslogtreecommitdiff
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-10-15 15:43:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-10-15 15:43:38 -0700
commit7f11b485215be205f498fe646a7adc8c8b5386a5 (patch)
tree10e56b84d6f7ed20eb743a0b2a444e56ffcb1323 /Documentation/git-branch.txt
parentMerge branch 'sb/perf-without-installed-git' (diff)
parentbranch: add '--points-at' option (diff)
downloadtgif-7f11b485215be205f498fe646a7adc8c8b5386a5.tar.xz
Merge branch 'kn/for-each-branch'
Update "git branch" that list existing branches, using the ref-filter API that is shared with "git tag" and "git for-each-ref". * kn/for-each-branch: branch: add '--points-at' option branch.c: use 'ref-filter' APIs branch.c: use 'ref-filter' data structures branch: drop non-commit error reporting branch: move 'current' check down to the presentation layer branch: roll show_detached HEAD into regular ref_list branch: bump get_head_description() to the top branch: refactor width computation
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index bbbade4f51..4a7037f1c8 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -11,7 +11,8 @@ SYNOPSIS
'git branch' [--color[=<when>] | --no-color] [-r | -a]
[--list] [-v [--abbrev=<length> | --no-abbrev]]
[--column[=<options>] | --no-column]
- [(--merged | --no-merged | --contains) [<commit>]] [<pattern>...]
+ [(--merged | --no-merged | --contains) [<commit>]] [--sort=<key>]
+ [--points-at <object>] [<pattern>...]
'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
'git branch' --unset-upstream [<branchname>]
@@ -231,6 +232,19 @@ start-point is either a local or remote-tracking branch.
The new name for an existing branch. The same restrictions as for
<branchname> apply.
+--sort=<key>::
+ Sort based on the key given. Prefix `-` to sort in descending
+ order of the value. You may use the --sort=<key> option
+ multiple times, in which case the last key becomes the primary
+ key. The keys supported are the same as those in `git
+ for-each-ref`. Sort order defaults to sorting based on the
+ full refname (including `refs/...` prefix). This lists
+ detached HEAD (if present) first, then local branches and
+ finally remote-tracking branches.
+
+
+--points-at <object>::
+ Only list branches of the given object.
Examples
--------