I'm working with a local descendant of the canonical humongous Git repository, the Linux kernel source (66k files, 870k+ commits, 3GB: love it). Of course, many tasks take a long time on my not-all-that-wimpy machine, which is a real problem as I work on updating my (customized) kernel.
I'd like to discard every commit older than, say, 2014, which would cut the commit count by 60%:
mbpe:linux griscom$ git log --format="%ad" --date="short" | cut -c1-4 | sort | uniq -c
1 1970
2 2001
12 2002
1 2003
17 2004
16697 2005
29255 2006
33757 2007
48825 2008
52600 2009
49814 2010
56403 2011
65393 2012
71002 2013
75652 2014
75801 2015
77040 2016
80797 2017
79977 2018
58296 2019
1 2030
1 2037
1 2085
mbpe:linux griscom$
But I'd still need the repository to fully function for later commits; I'd need to be able to pull and push as usual (understanding that some operations couldn't complete due to the age of the parent commits).
Is there any way to process a Git repository so that antique commits are removed, or at least don't slow down Git commands?