【发布时间】:2019-04-28 05:05:58
【问题描述】:
我正在尝试使用git reset --hard,但出现此错误:
fatal: cannot create directory at '[path]/img/products': Permission denied
我没有更改权限,之前一切正常。然后我尝试git checkout [branch name],我得到了这个:
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: cannot stat '[path]/img/products': Permission denied
error: Your local changes to the following files would be overwritten by checkout:
[path]/img/products/icons.png
[path]/img/products/buttons.png
Please commit your changes or stash them before you switch branches.
error: The following untracked working tree files would be overwritten by checkout:
[path]/img/leftbtn.png
[path]/img/rightbtn.png
[path]/img/logo.png
Please move or remove them before you switch branches.
Aborting
之前一切正常,我突然开始遇到上述问题。我只是想切换分支。你有什么推荐的尝试?
【问题讨论】:
标签: git permissions branch file-permissions git-reset