Forgive me as I've been using this text box to rubber duck this problem. Since I have it here already and I don't feel this is intuitive I'll just hit New Thread.
Suppose I don't care about a git repo's history. I just want the current master because I don't want to download/store gigabyes of stuff I don't need.
Months later I still don't personally care about the project's history but if I do a simple pull I'll have all these files stashed in .git that can represent any intermediate state from my initial clone until now.
How could I go about trashing all that stuff I don't want?
Basically I kind of want to use git like rsync.
I'm using git v2.18.0 btw. So far I've come up with...
git clone --depth 1 git://repo/foo.git
#later
git fetch --depth 1
git rebase
git reflog expire --all --expire=now
git gc --aggressive --prune=now
With this I can still do a pull --unshallow if I really need to.
If there's a better way then I'd much love to hear it. Also let me know if OP sucks dicks.
https://antilamer.livejournal.com/443564.html Was a large help.