我正在尝试在Git中重命名文件夹,但没有成功。在文件级重命名可以正常工作,例如,从“Test.txt”重命名为“test1.txt”可以完美地工作。在文件夹级别,它不起作用。
见下文
DOMAIN+HOSTID ZAF27 ~/Documents/-GitHub-/ (Test Branch-Deploy)
$ git mv Specification SPECIFICATION
Rename from 'Specification' to 'SPECIFICATION/Specification' failed. Should I try again? (y/n) y
Rename from 'Specification' to 'SPECIFICATION/Specification' failed. Should I try again? (y/n) y
Rename from 'Specification' to 'SPECIFICATION/Specification' failed. Should I try again? (y/n) y
Rename from 'Specification' to 'SPECIFICATION/Specification' failed. Should I try again? (y/n) n
fatal: renaming 'Specification' failed: Permission denied
DOMAIN+HOSTID ZAF27 ~/Documents/-GitHub-/ (Test Branch-Deploy)
发布于 2020-06-19 15:16:48
Git对目录一无所知--它跟踪文件。您可以使用以下命令执行所需的操作:
mv Specification SPECIFICATION
git rm -r Specification
git add SPECIFICATION
发布于 2020-06-19 18:17:52
这个问题现在已经解决了。这个问题似乎与“一些”访问权限有关。授予访问权限后,我删除了本地文件夹,并将其从服务器上拉回。只有这样才有帮助。
https://stackoverflow.com/questions/62464965
复制相似问题