Thinning a repository

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

 



Hi everyone,

Is there a quick way to reproduce the effect of a shallow clone on a
local repository that doesn't involve filter-branch and/or re-clone?

My motivation is to reduce the local size of repositories I'm only
following, by trimming the history without prejudice to a [N] set of
last commits. It feels stupid that the quickest way I'm aware of right
now to achieve this is to "git clone --depth N ..." again. filter-branch
is ridiculously slow, as it iterates through history.

I've tried using graft points, but the combination of:

echo [sha] > .git/info/grafts
git reflog expire --expire=0 --all
git repack -Ad

doesn't really save any space and/or reduce the object count as I would
expect. It means there's probably still reachable?

I'd really love to have a 'git thin [depth]' subcommand to perform the
above however. I don't really want to have to iterate through refs just
to check if they are still reachable within [n] commits just to delete them.

Thanks for any pointer.

--
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]