From: Jakub Narebski <jnareb@gmail.com>
To: Gelonida <gelonida@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to delete the entire history before a certain commit
Date: Mon, 03 May 2010 15:45:01 -0700 (PDT) [thread overview]
Message-ID: <m3ocgwfvw2.fsf@localhost.localdomain> (raw)
In-Reply-To: <hrnidr$etm$1@dough.gmane.org>
Gelonida <gelonida@gmail.com> writes:
> We have a git repository, whose size we want to reduce drastically due
> to frequent clone operations and a slow network connection.
Why frequent *clone* operations, instead of using "git fetch" or
equivalent ("git pull" which is fetch+merge, or "git remote update")?
If network is slow, you can do what others did in similar situations:
use hook to allow only not to large fetches (to prevent cloning)
directly on server, and provide bundle (see git-bundle(1)) to "seed"
the clone; it can be on dumb server (served resumably), and can be
also served by BitTorrent or equivalent.
> The idea is following:
>
> * archive the git repository just in case we really have to go back in
> history.
>
>
> create a new git repository, which shall only contain last month's activity.
>
> all changes before should be squashed together.
> It would be no problem if the very first commit remains unmodified.
If you want to simply _remove_ history before specified commit,
instead of squashing it, the best solution would be to use grafts to
cauterize (cut) history, check using [graphical] history viewer that
you cut it correctly, and then then use git-filter-branch to make this
cut permanent.
You can later use grafts or refs/replaces/ mechanism to join "current"
history with historical repository.
HTH.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2010-05-03 22:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 22:23 how to delete the entire history before a certain commit Gelonida
2010-05-03 22:45 ` Jakub Narebski [this message]
2010-05-03 23:11 ` Gelonida
2010-05-03 23:42 ` Jakub Narebski
2010-05-03 23:58 ` Gelonida
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=m3ocgwfvw2.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=gelonida@gmail.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).