From: Jonathan Nieder <jrnieder@gmail.com>
To: Andrew Benton <b3nton@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Configuring git to for forget removed files
Date: Sat, 20 Feb 2010 20:47:46 -0600 [thread overview]
Message-ID: <20100221024746.GA9628@progeny.tock> (raw)
In-Reply-To: <4B7FBB73.70004@gmail.com>
Hi Andy,
Andrew Benton wrote:
> I have a project that I store in a git repository. It's a bunch of
> source tarballs and some bash scripts to compile it all. Git makes
> it easy to distribute any changes I make across the computers I run.
This is not really what git is intended to do.
- git generally works better with files that are easy to diff; see
the “filter” attribute in gitattributes(5) for one way this is
sometimes achieved with meaningful binary files (e.g., the
compressed files OpenOffice produces)
- Though git can cope with large projects, it generally works best
when track the smallest meaningful unit that can be tested alone.
Submodules can be used to stitch them together.
Thus if it is important to you to track the history of this project, I
would suggest giving each source tree its own repository and stitching
them together with a “supermodule” that tracks your scripts and
includes references to the appropriate versions of each source
package.
See http://who-t.blogspot.com/2009/04/big-fat-xorg-supermodule.html
for an example of this kind of thing.
On the other hand, I don’t get the impression it is so important here
to track the history from the beginning, so:
> The problem I have is that over time the repository gets ever
> larger. When I update to a newer version of something I git rm the
> old tarball but git still keeps a copy and the folder grows ever
> larger. At the moment the only solution I have is to periodically rm
> -rf .git and start again. This works but is less than ideal because
> I lose all the history for my build scripts.
Maybe you could keep the build scripts in a git repository and
synchronizing the tarballs out of line with some other tool, such as
rsync or unison.
> Is it possible to make git delete its
> backup copies of removed files?
git is not intended to be a backup tool; as you’ve noticed, the older
versions gradually accumulate and it becomes apparent over time that
it would be really nice for older commits to expire.
I am guessing, but it sounds to me like what you are looking for is
something that is distributed like git but is a backup system. Or in
other words, a way to record a few snapshots like LVM or btrfs, but
such that new snapshots can be easily transfered to another computer.
At least I would be glad to learn of such a tool. ;-)
Hope that helps,
Jonathan
next prev parent reply other threads:[~2010-02-21 2:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-20 10:37 Configuring git to for forget removed files Andrew Benton
2010-02-20 15:41 ` Tim Visher
2010-02-20 18:50 ` Avery Pennarun
2010-02-20 19:16 ` Junio C Hamano
2010-02-21 2:47 ` Jonathan Nieder [this message]
2010-02-21 13:32 ` Andrew Benton
2010-02-21 20:32 ` Larry D'Anna
2010-02-21 21:14 ` Jacob Helwig
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=20100221024746.GA9628@progeny.tock \
--to=jrnieder@gmail.com \
--cc=b3nton@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).