git rebase: “error: cannot stat 'file': Permission denied”

后端 未结 30 2540
野趣味
野趣味 2020-12-02 04:56

I\'m using git, and made a small commit followed by a large one. I decided to use git rebase to squash the two commits together before pushing them. (I\'ve ne

30条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 05:20

    My encounter with this problem was caused by my editor, Intellij. As part of its internal version controls, it had gone through and locked all hidden git files. (For various reasons, I was not using the git plugin that comes with Intellij...)

    So I opened a normal dos window as Administrator, changed to the directory, and executed

    attrib -R /S
    

    That removed the lock on the files and everything worked after that and I could sync my changes using the GitHub windows client.

提交回复
热议问题