From: Junio C Hamano Date: Wed, 22 Nov 2017 02:13:31 GMT Subject: Re: [PATCH] rebase: rebasing can also be done when HEAD is detached Message-ID: In-Reply-To: <20171121152533.3793-1-kaartic.sivaraam@gmail.com> Kaartic Sivaraam writes: > In a repository when attempting to rebase when the HEAD is detached > and it is already up to date with upstream (so there's nothing to do), > the following message is shown > > Current branch HEAD is up to date. > > which is clearly wrong as HEAD is not a branch. > > Handle the special case of HEAD correctly to give a more precise > error message. > > Signed-off-by: Kaartic Sivaraam > --- > In this patch, I basically assumed that there would be no > branch named "HEAD". Perhaps time to learn "git symbolic-ref HEAD" and use it instead of depending on the name?