[Server-devel] How can I delete 10 years of git history in the XSCE repo?

James Cameron quozl at laptop.org
Thu Jan 19 01:42:24 EST 2017


On Wed, Jan 18, 2017 at 08:13:38PM -0800, George Hunt wrote:
> The XSCE repo, inherited from laptop.org has grown to 80MB+.

Yes, but what problem are you trying to solve?

A --depth 1 clone of xsce/xsce.git master is 1.64 MiB, and a --depth 1
clone of georgehunt/xsce.git base-6.2 is 941.93 KiB.  So the 80 MiB of
a full clone should have no impact unless the full history is needed;
almost nobody needs that.

Make sure your guidance for new developers mentions --depth properly,
and never script anything that clones without --depth.

> What's wanted is a repo that includes all of the commits starting from
> https:/github.com/xsce/xsce --branch release-6.0 and including all of
> the commits on https://github.com/georgejhunt/xsce --branch
> base-6.2.

Yes, easily said, not so easily done.

I've reproduced your problem, but with the release-6.0 branch alone.

That branch can't be easily reduced, because of merge conflicts that
were pushed before 6.0.  Rebasing across merge conflicts is fraught.

This blocks you from using the simple technique.

You have to either resolve each conflict, or get into rewriting
history.  Choose from the available mergetools.

It may be easier to start a fresh repository based on release-6.0,
then add a single commit to bring it to base-6.2.  Or add your ~637
commits as patches using "git format-patch" and "git am".

-- 
James Cameron
http://quozl.netrek.org/


More information about the Server-devel mailing list