Cloning git repository

I am trying to clone my fork of the repository using Ubuntu 18.04.2 on my windows computer. However, the repository seems to be at least 2 GB and for some reason the cloning process seems to freeze indefinitely before all of the repository can be received. Is there a way I can download in a compressed form or get it in smaller portions?

Yes - git clone --depth=$COMMITS. This will clone only the most recent $COMMITS commits.
You can then expand it with git fetch --deepen=$COMMITS to grab $COMMITS commits before the ones you cloned.

It seemed to say depth is not a positive number with 1 extra space behind depth.

I put --depth=1$COMMITS instead and it worked. Is this how it is supposed to work, like cloning the most recent set of commits?

Also, is the thing I just cloned all I need to build the most recent experimental version of the game, though not the previous versions?

You’re supposed to replace $COMMITS with a number, sorry for not making that clearer.
And yes, you won’t be able to build any previous versions or use any history, but you can build the experimental versions with a shallow clone.

I can split up the download now, but how do I turn the shallow clone into a full one? Do I just keep deepening until there are no more commits left?

Yep, that’s basically it. If you think you can do it one go, you can do git fetch --deepen=10000000 to grab all the commits (pretty sure we have less than 10 million). Otherwise, just incrementally grab a few thousand.

1 Like

Also unless you’re doing heavy merging you don’t need more than a few hundred commits

1 Like