Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对我的电脑做了一个 git clone。之后我意识到我将项目克隆到了错误的目录。我现在要做的是从我的计算机中删除项目文件夹,然后 git clone 到另一个目录。
如果我只是删除文件夹,它会影响远程存储库吗?
还有其他更好的方法吗?
您可以将目录移动到您真正想要的位置。移动或删除它不会影响远程存储库。
您可以在本地删除该文件夹,然后将其再次克隆到您要使用的目录。不会影响远程存储库。您也可以只移动文件夹,因为 .git 结构中没有绝对路径。