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!

Community
  • 1
  • 1
Jack
  • 9,615
  • 18
  • 72
  • 112

2 Answers2

1

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

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

Olivier Refalo
  • 50,287
  • 22
  • 91
  • 122
  • 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 06 '12 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.

Kayvan N
  • 8,108
  • 6
  • 29
  • 38