简体   繁体   中英

Git Error while trying to delete files in my Xcode Project

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM