[英]git clone does not work when directory not empty
I want to do git clone repo/branch_tag . 我想做git clone repo / branch_tag。 this command don't work because current directory not empty.
此命令不起作用,因为当前目录不为空。 this directory contain only one script:
该目录仅包含一个脚本:
git clone repo/branch_tag .
How can I do it ? 我该怎么做 ? can I do "
git reset --hard tagname
" after move to . 移至后,我可以做“
git reset --hard tagname
”吗? ? ? I can't remove script because it invoke this commands.
我无法删除脚本,因为它会调用此命令。
You can either remove that script or create the repo on a separate directory and then move the content into the desired one, not forget to add your .git folder when you do this. 您可以删除该脚本或在单独的目录中创建存储库,然后将内容移动到所需的目录中,不要忘了在执行此操作时添加.git文件夹。
Hope it helps 希望能帮助到你
Ps. PS。 If you remove the script you can paste it once the repo is fully cloned
如果删除脚本,则可以在完全克隆存储库后将其粘贴
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.