I use some of Xcode's source control features, specifically the blame feature in the main editor, but use git on the command line for all of my actual version control. This means that, fairly often, git commands on the command line fail with the message:
fatal: Unable to create '/path/to/repo/.git/index.lock': File exists.
Xcode is creating this file to lock the repo as it runs its own git commands. I've already turned off all the unnecessary source control options in Preferences (Refresh local status automatically, Refresh server status automatically, and Add and remove files automatically.)
My current strategy is just to retry the command until it works, which rarely takes more than one attempt.
Is there a way to make Xcode any less aggressive with how often it creates index.lock
?
Or, is there a way I can make git automatically retry commands until they succeed if they fail in this way?