在一些从服务器拉动更改之后。
我不能再推任何东西如果我尝试git git push 或 git pull 或 git merge 或 git rebase origin / master 或 git reset --hard
它始终表示致命:无法在/ root / wp-content /缓存/ page_enhanced / ....没有这样的文件或目录
即使当我创建新的干净存储库并试图克隆它仍然获得同样的错误。
我如何解决这个问题...无论如何,这是一些缓存目录,我不需要它...如何放弃或忽略它? / p>
解决方案取决于您正在运行的机器的操作系统和git版本,可能会有几件事情。有了更多的细节,我可以更具体。
在Windows上,它可以是目录的权限,也可以是目录/路径的长度。在Linux上,这将是权限。我还看到了在目录或文件中问题是不允许的字符的情况。
删除目录的最佳方法是将其克隆到某个可用的地方,如一个运行root的linux系统(或者vm或者run cygwin),然后把它添加到.gitignore文件中: / wp-content / cache / 。
然后,要删除已经缓存的信息,请键入: git rm -rf --cached wp-content / cache 和然后提交并推送。
After some pulling changes from server.
I can not anymore push anything no matter If I am trying git git push or git pull or git merge or git rebase origin/master or git reset --hard
It always says fatal: cannot create directory at /root/wp-content/cache/page_enhanced/.... No such a file or directory
Even when I create new clean repository and trying to clone it still gets same error.
How I can solve this... Anyway this is some cache directory and I don't need it... How to drop or ignore it?
解决方案Could be several things depending on the OS of the machine you are running and version of git. With more detail I could be more specific.
On Windows,it's either the permissions of the directories, or it's the length of the directories/paths. On Linux, it would be the permissions. I've also seen cases where the problem is non-allowed characters in directories or files.
Your best bet to remove the directory is to clone it somewhere that works, like a linux box running root (or a vm or run cygwin), and add this to the .gitignore file: /wp-content/cache/.
Then, to remove the already cached info, type: git rm -rf –-cached wp-content/cache and then commit and push.
更多推荐
致命:无法在/ root / wp
发布评论