Satish Balay <[email protected]> writes:
> How do I get a branch name? I would assume 'git branch' would give
> this info - but it does not [it gives a big list]
>
> http://stackoverflow.com/questions/6245570/how-to-get-current-branch-name-in-git
> has too many options - most are not suitable..
>
> git branch | sed -n '/\* /s///p'

What's wrong with "git rev-parse --abbrev-ref HEAD" or "git symbolic-ref HEAD"?

Attachment: pgpZzSOufWICj.pgp
Description: PGP signature

Reply via email to