0

When pulling changes from a remote branch, Git is throwing me this error:

From https://github.com/JackWebbHeller/MyProject

* branch master -> FETCH_HEAD

error: unable to unlink old 'MyProject/folder/directory/index.html' (Operation not permitted)

That was taken from the transcript from Tower for Mac. Can anyone advise? Thanks!

2 Answers 2

1

You probably have file index.html open in another editor.

The file was changed on the server and git tries to modify it.

1
  • That's weird. I had Dreamweaver open, but no files open within it. Upon closing Dreamweaver, everything worked again. Thanks for the tip!
    – Jack
    Aug 6, 2012 at 12:30
1

One other possible situation is if you are on a mac and the file has been flagged as "locked", in which case the file is read only and git can not remove it. Solution is to check the file in your finder and remove the flag in "Get info" option.

1
  • I encountered this issue when using git on windows. Nice to know it.
    – Gang Liang
    Aug 23, 2016 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.