Subject: Re: Checkout tag?

From: Magnus Bäck <[email-masked]>
Date: Sun, 22 Jan 2012 11:11:16 +0100

On Sunday, January 22, 2012 at 11:05 CET,
     Abscissa <[email-masked]> wrote:

> I've managed to figure out you switch branches with the checkout
> command, like this:
> 
> >git checkout branch_name
> 
> Does that work for tags as well? The docs don't seem clear on that.
> If not, how do you get the working copy to be a specific tag?

Yes, "git checkout" works for branches, tags, commit SHA-1s, and
anything else that can be resolved to a SHA-1 identifying what to
check out. The git-checkout(1) man page says the following:

       git checkout [--patch] [<tree-ish>] [--] <pathspec>...
           ... The <tree-ish> argument can be used to specify a
           specific tree-ish (i.e. commit, tag or tree) ...

-- 
Magnus Bäck                   Opinions are my own and do not necessarily
SW Configuration Manager      represent the ones of my employer, etc.
Sony Ericsson