git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git Feature Request - show current branch
@ 2015-02-19 13:14 mdconf
  2015-02-19 13:32 ` Randall S. Becker
  0 siblings, 1 reply; 5+ messages in thread
From: mdconf @ 2015-02-19 13:14 UTC (permalink / raw)
  To: git

Hello,

To start with, I did not find an official way to submit feature request so hopefully this is the right way to do so - if not then my apologize & appreciate if somebody could re-submit to the proper place.

I'd like to request adding a parameter to 'git branch' that would only show the current branch (w/o the star) - i.e. the outcome should only be the name of the branch that is normally marked with the star when I do 'git branch' command. This may be very helpful in some external scripts that just simply need to know the name of the current branch. I know there are multiple ways to do this today (some described here: http://stackoverflow.com/questions/6245570/how-to-get-current-branch-name-in-git) but I really think that adding simple argument to 'git branch' would be very useful instead of forcing people to use 'workarounds'.

My suggestion is is to name the parameter '--current' or '--show-current'.
Example:

Command: git branch
Outcome:
 branchA
 branchB
* master

Command: git branch --current
Outcome:
master

Thank you,
Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-20 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 13:14 Git Feature Request - show current branch mdconf
2015-02-19 13:32 ` Randall S. Becker
2015-02-19 16:21   ` Michael J Gruber
2015-02-19 18:10     ` Junio C Hamano
2015-02-20 10:16       ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).