From: Björn Steinbrink Date: Tue, 16 Dec 2008 06:26:34 GMT Subject: Re: [usability bug] git branch -a does not disambiguate remote and local branches Message-ID: <20081216062634.GB3684@atjola.homenet> In-Reply-To: <85647ef50812151015t4d5bc2b8p4ea53a0e4ad25e64@mail.gmail.com> On 2008.12.15 21:15:15 +0300, Constantine Plotnikov wrote: > After this scenario is executed, git branch -a will give the following output: > master > * origin/master > origin/master > > Note that there is two origin/master entries, but it is not clear > which is remote is and which is the local. I think that "git branch > -a" should print unambiguous names, qualifying them if needed. Actually, it is clear. The one with the * is the local one. The remote tracking branch will never be marked as checked out, as you would get a detached HEAD when you do "git checkout remotes/origin/master". When there are duplicate entries, you can be sure that you have a local branch head and a remote tracking branch with the same shortname. And when one of them has been marked as checked out, you can be sure that it is the local one. Björn