Git Checkout warning: unable to unlink files, permission denied

后端 未结 26 1233
梦毁少年i
梦毁少年i 2020-12-04 08:46

I am aware that there are similar issues about git relating to the \'unable to unlink\' warning, but I have not been able to use them.

The main difference is that th

26条回答
  •  忘掉有多难
    2020-12-04 09:31

    I ran into this problem whenever running "git repack" or "git gc" on my OS X machines, even when running git with admin privileges, and I finally solved it after coming across this page: http://hints.macworld.com/comment.php?mode=view&cid=1734

    The fix is to open a terminal, go to your git repo, cd into the .git folder, and then do:

    chflags -R nouchg *
    

    If that was the issue, then after that, your git commands will work as normal.

提交回复
热议问题