Re: Working with git repo tagged versions - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Working with git repo tagged versions
Date
Msg-id 201111112053.pABKr5027580@momjian.us
Whole thread Raw
In response to Working with git repo tagged versions  (Robert Treat <rob@xzilla.net>)
Responses Re: Working with git repo tagged versions
Re: Working with git repo tagged versions
List pgsql-hackers
Robert Treat wrote:
> Howdy folks,
> 
> Occasionally I need to grab an older release from git based on a tag
> rather than a branch, eg the REL8_3_10 tag vs the REL8_3_STABLE
> branch. I used to know how to do this in CVS, but I find I tend to
> revert to grabbing tarballs now that we're on git. So, I'm wondering
> if anyone knows a way to do this directly from git clone (or similar),
> and ideally as a shallow clone (ie. I just need a copy of the code at
> that tag, rather than needing the repo for development purposes). If
> anyone knew a way to do this down to a specific commit, that would
> also be interesting to know. Thanks in advance.

I just did this:
$ git-new-workdir postgresql/.git/ tmpChecking out files: 100% (3903/3903), done.$ cd tmp$ git checkout REL8_3_10

That does use a shadow clone.  Basically, git checkout assumes a tag,
unless you -b for a branch.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Working with git repo tagged versions
Next
From: Alvaro Herrera
Date:
Subject: Re: Working with git repo tagged versions