Hi,
On Sun, Jan 4, 2009 at 7:49 AM, demerphq [off-list ref] wrote:
2009/1/4 Karl Chen [off-list ref]:
quoted
On 2009-01-04 00:21 PST, Arnaud Lacombe writes:
Arnaud> $ git branch | awk '/^\*/ {print $2}'
Yet another addition to the list of ways to pipeline it, this one
probably the shortest :)
Unfortunately it doesnt work well when you arent on a branch:
$ git branch | awk '/^\*/ {print $2}'
(no
So far two apparently expert git people have given solutions to this
problem that don't elegantly handle the edge cases.
my bad:
$ git branch | awk '/^\*/ {print substr($0, 3)}'
- Arnaud