All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Using git for file archival/backup purposes - deletion strategy
Date: Thu, 27 Dec 2007 10:18:29 +0100	[thread overview]
Message-ID: <47736DE5.40509@viscovery.net> (raw)
In-Reply-To: <46a038f90712261443t6aa0cd76u46d8ae88fc7c1eba@mail.gmail.com>

Martin Langhoff schrieb:
> What I am not 100% clear on is the "old history" deletion strategy.
> The history will be *strictly* linear, so my intention is to keep the
> last N commits, by overriding the parent of the Nth commit that git
> log lists with a "shallow" entry in $GIT_DIR/shallow as documented in
> Documentation/technical/shallow.txt , and call gc after that.
> 
> Is that the correct way to "forget" old history? Searching high and
> low in the list, I fail to find a definitive answer. Shallow and
> grafts entries are discussed as ways of doing this, but I can't find a
> "correct" way of doing this.

I'm doing something like this. Basically:

   git rev-parse "HEAD~$N" > .git/info/grafts
   git filter-branch -f HEAD

If you omit filter-branch, then a repack -a -d will corrupt the repository
(I think) unless you keep the grafts file with it and in all its clones
forever.

-- Hannes

  reply	other threads:[~2007-12-27  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-26 22:43 Using git for file archival/backup purposes - deletion strategy Martin Langhoff
2007-12-27  9:18 ` Johannes Sixt [this message]
2007-12-27 16:36 ` Charles Bailey
2007-12-27 22:08   ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47736DE5.40509@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=martin.langhoff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.