Use domestic mirror website
At present, it is known that there are domestic mirror websites on Github github.com.cnpmjs.org
. You only need to github.com
replace it with when cloning a project github.com.cnpmjs.org
to achieve accelerated downloading. The following example:
github.com:
git clone https://github.com/xmy0916/EuroTruckSelfDriver.git
Turtle speed download, real hammer.
github.com.cnpmjs.org:
git clone https://github.com.cnpmjs.org/xmy0916/EuroTruckSelfDriver.git
It can be found that the use of domestic mirror stations is fast!
Solve the download failure problem caused by the file is too large
Although the download was successful, the download failed again!
problem
Solution
method one:
Tried to increase the size of the git buffer, and it still reports an error after it is expanded by 8 times (because the file under the blogger is about 1.5G, it may be too large and fail. Students who git clone some smaller files can try this method to solve):
git config --global http.postBuffer 524288000
git config --list
Method 2: (Pro-test successful)
Shallow clone , the depth is set to 1:
git clone http://github.com/target.git --depth 1 # target.git 为目标地址
cd target
git fetch --unshallow
Successful screenshot:
Reference article: