Couldn't checkout HEAD Unable to create branch
Answered
'/home/user/PycharmProjects/ExampleProject/ExampleRepository/.git/index.lock': permission denied
Im getting this error when trying to create a new branch in PyCharm. I've attempted changing the permissions on the .git/index.lock file but this doesn't work. I still am getting this error. I've looked all over but haven't gotten any answers.
Please sign in to leave a comment.
Hi,
Does it work from the terminal?
I have the branches directory set to drw-rw-r-- and user:user and it still isn't giving me access to create a new branch in pycharm. I do have access to the Directory in terminal, yes.
@... the error which you observe is thrown by git.
Could you please check whether you are able to create a new branch via terminal?
Please check which user owns a .git foler by running:
It may worth to change ownership to user:user for .git as you did for branches directory:
sudo chown -R <owner>:<group> .git