From: Junio C Hamano Date: Wed, 29 Aug 2007 08:59:44 GMT Subject: Re: git-svn tags and branches Message-ID: <7v4piisolb.fsf@gitster.siamese.dyndns.org> In-Reply-To: "Giuseppe Bilotta" writes: > BTW can git have a tag and a branch with the same name? If > not,... This is "Yes but". You can have a tag foo and branch foo. - "git checkout foo" would switch you to foo branch - Anything else that lets you use an abbreviated refname 'foo', e.g. . git branch newbranch foo . git log foo . git diff foo will scold you that 'foo' is ambiguous, while it does not outright fail, and takes the first match from the list defined in sha1_name.c (ref_fmt[]), so a tag wins over a branch. You can clarify yourself to avoid ambiguity like so: . git branch newbranch heads/foo ;# I mean "branch from foo branch" . git log tags/foo ;# "show history starting at that tag"