git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] doc/git-branch: Document the --current option

From
Daniels Umanovskis <daniels@umanovskis.se>
Date
Oct 9, 2018, 18:31 UTC
Message-ID
<20181009183114.16477-2-daniels@umanovskis.se>
In-Reply-To
<20181009183114.16477-1-daniels@umanovskis.se>
Signed-off-by: Daniels Umanovskis <daniels@umanovskis.se>
---
 Documentation/git-branch.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index bf5316ffa..a7167df74 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git branch' [--color[=<when>] | --no-color] [-r | -a]
-	[--list] [-v [--abbrev=<length> | --no-abbrev]]
+	[--list] [--current] [-v [--abbrev=<length> | --no-abbrev]]
 	[--column[=<options>] | --no-column] [--sort=<key>]
 	[(--merged | --no-merged) [<commit>]]
 	[--contains [<commit]] [--no-contains [<commit>]]
@@ -160,6 +160,10 @@ This option is only applicable in non-verbose mode.
 	branch --list 'maint-*'`, list only the branches that match
 	the pattern(s).
 
+--current::
+	Print the name of the current branch. In detached HEAD state,
+	or if otherwise impossible to resolve the branch name, print
+	"HEAD".
 -v::
 -vv::
 --verbose::
-- 
2.19.1.274.g059d67db4.dirty
Previous: Daniels UmanovskisNext: Junio C Hamano
Message 2 of 5 in “branch: introduce --current display option”
  1. 1/2 branch: introduce --current display optionDaniels Umanovskis, Oct 9, 2018
  2. 2/2 doc/git-branch: Document the --current optionDaniels Umanovskis, Oct 9, 2018
  3. Junio C HamanoOct 10, 2018
  4. Stefan BellerOct 9, 2018
  5. Daniels UmanovskisOct 9, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.