git clone in a slow connection
It happens more often than not, I am on a slow internet connection and I have to clone a decently-huge git repository. The most common issue is the connection closes and the whole clone is cancelled.
|
|
After a lot of trial and errors and a lot of “remote end hung up unexpectedly” I have a way that works for me. The idea is to do a shallow clone first and then update the repository with its history.
|
|
And, that’s all folks
Note : This can be equally useful for large repositories as well. More useful for large repositories in a slow connection :D