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

Re: Is there a way to control the number of revisions will be saved by git

From
JHJean-Luc Herren <jlh@gmx.ch>
Date
Dec 3, 2008, 13:04 UTC
Message-ID
<493683C6.8060902@gmx.ch>
In-Reply-To
<1228304226.23167.8.camel@therock.nsw.bigpond.net.au>
Arafangion wrote:
Show 6 quoted lines
> On Wed, 2008-12-03 at 13:01 +0200, Tzury Bar Yochay wrote:
> <snip>
>> Say I wish to save only 100 generations back (per branch).
>> Is it possible to configure git so it will save only N records back.
> 
> What would be the advantage in doing that?

That would be a shallow repository, as is already supported by "git clone --depth 100". It can be useful for a number of things, for example developing simple patches on top of HEAD and sending them somewhere.

What the OP might want is a way to convert a full repository into a shallow one (can be done by cloning and deleting the original), and then be able to make it shallower from time to time, to limit it to 100 revisions; not sure if that is possible.

jlh
Previous: ArafangionNext: Tzury Bar Yochay
Message 6 of 9 in “Is there a way to control the number of revisions will be saved by git”
  1. Tzury Bar YochayDec 3, 2008
  2. Johannes SixtDec 3, 2008
  3. Jakub NarebskiDec 3, 2008
  4. Miklos VajnaDec 3, 2008
  5. ArafangionDec 3, 2008
  6. Jean-Luc HerrenDec 3, 2008
  7. Tzury Bar YochayDec 3, 2008
  8. Tzury Bar YochayDec 3, 2008
  9. Tzury Bar YochayDec 3, 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.