killall Xcode
07 Apr 2022Xcode doesn’t handle swapping git branches very well if you use the command line for git. My experience is that I’m often changing branches using my terminal and then I see the Xcode icon start jumping angrily in the dock, when I goto Xcode I see this prompt
Neither option does what I want
Keep Xcode Version
is not right because I’ve just changed branch so I want to load the new version of the projectUse Version on Disk
is the right option but it never works because Xcode gets into a state where it just won’t build
Dealing with the above is slow and results in me needing to close Xcode to reopen the project fully.
To add to the annoyance I have to navigate to Xcode, dismiss the UI alert and then close because the UI alert prevents me from pressing cmd + q
whilst cmd + tab
ing over the app.
Hacky solution
YMMV but I’ve taken to running killall Xcode
as soon as I see the Xcode icon bounce in the dock.
It means I don’t have to waste time navigating to Xcode to handle the UI blocking alert before quitting Xcode.
Also because I’m on terminal already I’m only a few keystrokes away.