从服务器中拉出一些更改后.
After some pulling changes from server.
无论我尝试以下哪种方法,我都不能再push:
I can not any more push anything no matter if I try these:
- git push或
- git pull或
- git merge或
- git rebase origin/master或
- git reset --hard
- git push or
- git pull or
- git merge or
- git rebase origin/master or
- git reset --hard
它总是说...
fatal: cannot create directory at /root/wp-content/cache/page_enhanced/.... No such a file or directory`即使我创建新的干净存储库和clone,它仍然会出现相同的错误.
Even when I create new clean repository and clone, it still gets same error.
我该如何解决? 无论如何,这是一些缓存目录,而我真的不需要它,如何删除或忽略它?
How I can solve this? Any way this is some cache directory and I don't really need it, how to drop or ignore it?
推荐答案根据您正在运行的计算机的操作系统和git的版本,可能有几件事.更详细地讲,我可能会更具体.
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.
在Windows上,它是目录的权限,或者是目录/路径的长度.在Linux上,将是权限.我还看到了问题所在,原因是目录或文件中不允许使用字符.
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.
删除目录的最佳选择是将其克隆到可以运行的地方,例如运行根目录(或vm或运行cygwin)的linux盒,然后将其添加到.gitignore文件:/wp-content/cache/.
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/.
然后,要删除已经缓存的信息,请键入: git rm -rf –-cached 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
发布评论