克隆git仓库没有历史吗? [英] Clone git repository without history?
本文介绍了克隆git仓库没有历史吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要从github克隆存储库.它有很多历史,所以我想要没有任何历史的克隆.
I wanted clone repository from github. It had lot of history, So i wanted clone without any history.
是否可以克隆没有历史记录的git存储库?
Is it possible to clone git repository without history?
推荐答案
您可以使用--depth
选项获得值为1的浅表克隆
You can get a shallow clone using the --depth
option with value 1
git clone --depth 1 reponame.git
如果您想要更多的提交历史记录,请根据需要增加值以满足您的需求.
If you want more commit history, increase the value to meet your needs as required.
这篇关于克隆git仓库没有历史吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文