Re: delete deprecated refs to release disk space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/11/13 Peter Vereshagin <peter@xxxxxxxxxxxxxx>:
> Hello.
>
> I use git for sql database backups:
>
>    http://gitweb.vereshagin.org/endvance/blob_plain/HEAD:/endvance/README
>
> Am wondering if there is a way to remove the expired revisions? Following that
> scenario:
>
>    https://gist.github.com/1362183
>
> I think there should be the way to decrease the space that .git takes. Without
> compression, of course.
>
> No problem if this involves the overwriting of the history like  filter-branch
> does.  But filter-branch doesn't seem to be able to remove the old  info  from
> repository based on expiration time, does it?

What you're looking for is git-filter-branch + the graft facility. I
can't remember the exact invocation, but you echo the sha1 of the
commit you want to be the oldest commit to .git/info/grafts, then run
git-filter-branch.

You can use whatever you like to discover that sha1, e.g. keep N
revisions (which might be committed once per day) around, or have some
custom time limit etc.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]