1

My problem arose when trying to delete view controllers in my project. I select them in the left side Project Navigator and press Delete. I choose the option "to trash" and it returns an error:

If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.

As far as I know, I do not even have a git repo of the project I am currently having the problem with.

Liftoff
  • 24,717
  • 13
  • 66
  • 119
DTDev
  • 307
  • 4
  • 15
  • Maybe there is a file .git/index.lock for some reason? http://stackoverflow.com/questions/8198966/how-do-i-fix-a-failed-git-commit – minopret Apr 25 '13 at 17:15
  • I think that is the problem. However, I am unsure how to find and delete that file/lock. – DTDev Apr 25 '13 at 18:29
  • You go to Applications or Launchpad and run the application named Terminal, which unlike Finder doesn't avoid showing you files and folders whose names start with a period. Then you type `ls .git/index.lock` and press Enter to confirm that the file is there. If that prints `.git/index.lock`, you know that the file is there. To remove it, you type `rm .git/index.lock` and press Enter. – minopret Apr 25 '13 at 18:33
  • Thank you so much. That was very easy to follow. – DTDev Apr 25 '13 at 20:00

1 Answers1

1

Maybe there is a file .git/index.lock for some reason. How do I fix a failed git commit?

To find and delete that lock file, you go to Applications or Launchpad and run the application named Terminal, which unlike Finder doesn't avoid showing you files and folders whose names start with a period. Then you type ls .git/index.lock and press Enter to confirm that the file is there. If that prints .git/index.lock, you know that the file is there. To remove it, you type rm .git/index.lock and press Enter.

Community
  • 1
  • 1
minopret
  • 4,726
  • 21
  • 34