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

后端 未结 30 2300
野趣味
野趣味 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:09

    Killing the w3wp.exe process related to the repository fixed this for me.

    0 讨论(0)
  • 2020-12-02 05:10

    On Windows, it can be a TortoiseGIT process that blocks those files. Open task manager and end process TGitCache.exe.

    0 讨论(0)
  • 2020-12-02 05:11

    This can also happen when you're using SublimeText and the popup window asking you to buy the program is not closed.

    0 讨论(0)
  • 2020-12-02 05:12

    An alternate solution rather than closing all apps that might be locking the directory as just about every other answer says to do, would be to use a utility that will unlock the files/directory without closing everything. (I hate needing to restart Visual Studio)

    LockHunter is the one that I use: https://lockhunter.com/ There are likely others out there as well, but this one has worked great for me.

    0 讨论(0)
  • 2020-12-02 05:14

    Happened to me on Windows while rebasing inside IntelliJ integrated terminal. I noticed that I had Git bash client instance running in parallel.

    Closing Git bash solved the problem.

    0 讨论(0)
  • 2020-12-02 05:14

    I had a similar problem. But it was very simple to resolve. On a Windows machine, my file explorer had a folder open that existed in one branch but not in the other I checked out. Closing the File explorer resolved the problem.

    0 讨论(0)
提交回复
热议问题