On Fri, 5 Sep 2014, Patrick Sanan wrote: > This appears to work too: > git name-rev --name-only HEAD > (I think for detached heads it gives you master~1 or the like) Yes, this also looks good. thanks, Satish