Re: Archiving tags/branches?
- From
Johan Herland <johan@herland.net>
- Date
- Oct 18, 2008, 11:15 UTC
- Message-ID
- <200810181315.49265.johan@herland.net>
- In-Reply-To
- <20081018102345.GA3749@neumann>
On Saturday 18 October 2008, SZEDER Gábor wrote:
Show 24 quoted lines
> Hi Pete, > > On Fri, Oct 17, 2008 at 06:43:46PM -0700, Pete Harlan wrote: > > If I wanted to archive those, it looks like this would work: > > > > mkdir .git/refs/archived-tags > > cp -a .git/refs/tags/* .git/refs/archived-tags > > git tag -d <tag-to-hide> # repeat as necessary > > > > I can then maintain a short list of tags that currently interest me, > > but am guaranteed not to lose old branches (say) referenced by those > > tags. > > > > Is there a reason this won't work? > > Yes: > > [...] > > So, if you put any tags or branches under refs/whatever-non-standard/, > then it gets deleted when you gc (or when gc is run automatically). > > I don't know whether this behaviour is intentional or not, but I have > experienced this the hard way recently.
Go have a look in .git/packed-refs. Then have a read through git-pack-refs(1).
Have fun! :)
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net