gpt4 book ai didi

Git Windows : Cannot clone/checkout repository paths with spaces

转载 作者:太空狗 更新时间:2023-10-29 13:27:10 24 4
gpt4 key购买 nike

我正在尝试 check out 包含空格的路径的存储库。git 克隆/checkout 失败。返回如下错误

fatal: cannot create directory at 'main-path/some-folder-with-space /another-folder': No such file or directory

解决者:

  1. 从 github 下载项目 zip。
  2. 提取项目。
  3. 初始化
  4. git remote add origin git@github.com:MainRepo/project.git
  5. git fetch --all

项目现已成功克隆到我的 Windows 机器上。我可以检查远程分支而不会出现任何错误。

最佳答案

把地址放在引号里

git clone "some/folder/with spaces/here.git"

关于Git Windows : Cannot clone/checkout repository paths with spaces,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42757759/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com