Re: Git Feature Request - show current branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Randall S. Becker venit, vidit, dixit 19.02.2015 14:32:
> git symbolic-ref --short HEAD

That errors out when HEAD is detached.

git rev-parse --symbolic-full-name [--abbrev-ref] HEAD

returns the branch name or HEAD. Though it's a bit difficult to discover.

I guess git 3.0 will have "git branch" and "git branches" :)

Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]