git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
Cc: "Sam Vilain" <sam@vilain.net>, "David Kastrup" <dak@gnu.org>,
	git@vger.kernel.org, "Eric Wong" <normalperson@yhbt.net>
Subject: Re: git-svn tags and branches
Date: Wed, 29 Aug 2007 01:59:44 -0700	[thread overview]
Message-ID: <7v4piisolb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <cb7bb73a0708290141y159d6bbfj2bac23af5e86bb15@mail.gmail.com> (Giuseppe Bilotta's message of "Wed, 29 Aug 2007 10:41:07 +0200")

"Giuseppe Bilotta" <giuseppe.bilotta@gmail.com> 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"

  parent reply	other threads:[~2007-08-29  8:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 14:08 git-svn tags and branches Giuseppe Bilotta
2007-08-27 15:09 ` David Kastrup
2007-08-27 15:31   ` Mike Hommey
2007-08-27 15:36     ` Benoit SIGOURE
2007-08-27 17:08       ` Giuseppe Bilotta
2007-08-27 15:42   ` Giuseppe Bilotta
     [not found]     ` <46D38B3D.6070809@vilain.net>
     [not found]       ` <85absc6we7.fsf@lola.goethe.zz>
     [not found]         ` <cb7bb73a0708280209r36136128x7bce310bf4fd4f66@mail.gmail.com>
     [not found]           ` <86sl64nhc1.fsf@lola.quinscape.zz>
     [not found]             ` <cb7bb73a0708280237v6f248517h183174bc41296df3@mail.gmail.com>
     [not found]               ` <46D4A664.4070007@vilain.net>
     [not found]                 ` <cb7bb73a0708281620v41383ed8w728af0112d2a6360@mail.gmail.com>
     [not found]                   ` <46D4ECE2.9020806@vilain.net>
2007-08-29  8:41                     ` Giuseppe Bilotta
2007-08-29  8:56                       ` Andreas Ericsson
2007-08-29  8:59                       ` Junio C Hamano [this message]
2007-08-29 10:53                         ` Giuseppe Bilotta
2007-08-29 20:15                           ` Junio C Hamano
2007-08-29 21:06                             ` Giuseppe Bilotta
     [not found]                             ` <cb7bb73a0708291402r3e9dfdeeh85bcc47ef9eba782@mail.gmail.com>
     [not found]                               ` <7vy7fu9h9n.fsf@gitster.siamese.dyndns.org>
2007-08-29 21:27                                 ` Giuseppe Bilotta
2007-08-30 10:21 ` Eric Wong
2007-08-30 11:44   ` Giuseppe Bilotta
2007-08-30 12:25     ` Peter Baumann
2007-08-30 16:01       ` Giuseppe Bilotta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4piisolb.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=giuseppe.bilotta@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=sam@vilain.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).