Git development
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Tomas Carnecky <tom@dbservice.com>
Cc: git@vger.kernel.org
Subject: Re: any way to apply tag across all branches in repository?
Date: Tue, 19 May 2009 10:59:50 -0600	[thread overview]
Message-ID: <4A12E586.60705@nortel.com> (raw)
In-Reply-To: <F3E3C849-76E1-4D5F-8305-276C4C205250@dbservice.com>

Tomas Carnecky wrote:

> Tags are not specific to any branch in particular. Usually you tag  
> commits, and git doesn't care on which branch these commits are. That  
> information is not recorded in the tag.
> 
> What you can do is create an alias that iterates over all branches and  
> tags each one.
> 
> git for-each-ref refs/heads/main refs/heads/arch/ | while read sha  
> type ref; do
>      git tag TAGNAME $sha -m "Tagged $ref"
> done
> 
> $sha is the sha where the ref points to, $type will be 'commit' and  
> $ref is the full ref (refs/heads/arch/xxx for example)

I tried something like this manually but on the second branch it complained
that the tag already existed.

Chris

  reply	other threads:[~2009-05-19 17:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 16:26 any way to apply tag across all branches in repository? Chris Friesen
2009-05-19 16:52 ` Tomas Carnecky
2009-05-19 16:59   ` Chris Friesen [this message]
2009-05-19 17:05 ` Brandon Casey
2009-05-19 17:48   ` Chris Friesen
2009-05-19 18:33     ` Linus Torvalds
2009-05-19 19:05       ` Chris Friesen
2009-05-19 20:14         ` Linus Torvalds
2009-05-19 20:56           ` Chris Friesen
2009-05-19 21:06             ` Linus Torvalds
2009-05-19 21:31               ` Chris Friesen
2009-05-19 18:36     ` Brandon Casey
2009-05-19 19:05       ` Chris Friesen
2009-05-19 19:30         ` Brandon Casey
2009-05-19 19:49           ` Chris Friesen
2009-05-19 19:58             ` Brandon Casey
  -- strict thread matches above, loose matches on Subject: below --
2009-05-20  8:58 Mark Struberg

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=4A12E586.60705@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=git@vger.kernel.org \
    --cc=tom@dbservice.com \
    /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