如何在没有整个历史的情况下克隆种子/启动项目? [英] How to clone seed/kick-start project without the whole history?
本文介绍了如何在没有整个历史的情况下克隆种子/启动项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请注意,使用 - depth = 1
参数可以防止将项目推送到新的存储库。
详见:远程拒绝(更新不允许)
您可以做一个
git clone< git_url>
从您的文件夹中删除.git存储库。这将删除所有的历史记录。
你可以做一个
git init
这将为您创建一个全新的git项目。
这可能不是最好的方法。但这会起作用。希望它有帮助。
Note that using --depth=1
parameter prevents you from pushing the project to a new repository.
for details see: "Remote rejected" (shallow update not allowed) after changing Git remote URL
解决方案
You can do a
git clone <git_url>
delete the .git repository from your folder. Which will delete all your history.
The you can do a
git init
which will create an entirely new git project for you.
This may not be the best way. But this will work . Hope it helps.
这篇关于如何在没有整个历史的情况下克隆种子/启动项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文