Suppose I clone from a 30000 commit repo on GitHub. If my understanding is correct, it will copy over all 30000 commits, which can take up a lot of disk space. However, 99% of the time I don't care about 29990 of those commits, since I only need to see the most recent history from git log.
I am aware of using git clone --depth N in order to only checkout the last N commits, however I'm wondering if there is a way to continually enforce this?
E.g. I checkout the latest 1000 commits. 200 more commits are then made on remote, so the next time I pull, the oldest 200 commits are removed from disk and the new 200 commits are added, so that I only ever store 1000 commits locally.
I don't have a very in-depth understanding of git, so any explanation is very helpful!