From: Junio C Hamano Date: Mon, 27 Jul 2015 21:49:20 GMT Subject: Re: git branch command is incompatible with bash Message-ID: In-Reply-To: <55B69E68.90306@kdbg.org> Johannes Sixt writes: > Try > > branchName=$(git rev-parse --abbrev-ref HEAD) Hmm, interesting. $ git checkout --orphan notyet $ git rev-parse --abbrev-ref HEAD $ git symbolic-ref --short HEAD