Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git clone 提速小技巧 #136

Open
GleanCoder1116 opened this issue Sep 6, 2021 · 0 comments
Open

git clone 提速小技巧 #136

GleanCoder1116 opened this issue Sep 6, 2021 · 0 comments
Labels
软技能 软技能

Comments

@GleanCoder1116
Copy link
Member

方式 1:

git clone https://github.[you project] --depth=1

--depth 参数只会下载一个commit,所以内容较少。时间自然而然就减少了很多。不影响任何提交操作;只是不能切换到历史commit中。为了读源码的时候可以添加该参数。

方式二:

-single-branch 该参数,这个比较好理解就是仅仅拉取单个分支,可以和 --depth 同时使用

@GleanCoder1116 GleanCoder1116 added the 软技能 软技能 label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
软技能 软技能
Projects
None yet
Development

No branches or pull requests

1 participant