git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: SZEDER GáborNext: SZEDER Gábor
Message 5 of 14 in “Archiving tags/branches?”
  1. Pete HarlanOct 18, 2008
  2. David SymondsOct 18, 2008
  3. Pete HarlanOct 20, 2008
  4. SZEDER GáborOct 18, 2008
  5. Johan HerlandOct 18, 2008
  6. SZEDER GáborOct 18, 2008
  7. Johan HerlandOct 18, 2008
  8. Pete HarlanOct 20, 2008
  9. Johan HerlandOct 20, 2008
  10. Pete HarlanOct 21, 2008
  11. Jakub NarebskiOct 20, 2008
  12. Pete HarlanOct 21, 2008
  13. Jakub NarebskiOct 21, 2008
  14. Pete HarlanOct 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.