Error: The source control operation failed because the revisions Error: The source control operation failed because the revisions git git

Error: The source control operation failed because the revisions


That could happen if the state of the git repo isn't proper:

  • file outside if a git repo, or
  • no commit yet (initial first commit), or
  • no files added to the index

(there was also repo of XCode 7 crashing on git commit)

Go to the parent folder of the modified file, and to a git status, to check what is actually going on.
Check also (just after seeing that error message) the /Applications/Utilities/Console.app in case there are more clues (as it was done before for this other error bug report)


I had the same situation.In my case, with several files I got the error for any git related operation and other files it worked fine.

Finally I found that those file paths were a little bit wrong on Xcode "File Inspector" view.The file path I saw was like "Foo/foo.m" but actually it must be "foo/foo.m".I clicked the folder icon and select the file again.Then Xcode shows the correct path and I've got working.

I hope this helps someone's situation too.


If you have Version Editor > Blame turned on, turn it off. You can do this by clicking the button with the lines (highlighted) to show the Standard Editor again. Here's a screen shot:

enter image description here