Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Xcode 4 stop auto staging with git

Tags:

git

xcode

xcode4

I hate it that whenever I make a change in Xcode 4 it automatically does a "Git add" command. Is there a way to make this stop?

like image 867
Christian Schlensker Avatar asked May 20 '11 19:05

Christian Schlensker


2 Answers

While the question title says XCode 4 this question appears at the top for many search results related to this issue even in newer versions of XCode. Here is an answer that addresses newer versions of XCode. In XCode 6 you can turn off version control by going to XCode --> Preferences --> Source Control Tab and uncheck Enable Source Control.

like image 130
SnapShot Avatar answered Sep 23 '22 08:09

SnapShot


What I do is perform all my git interaction through the command line. Since I can't get Xcode to ignore the fact that my project is under git control, and since therefore I can't get Xcode to stop doing git add for every new file I create, when I get to the command line the first thing I do is git reset to reset the index. This undoes all the annoying git add stuff that Xcode did automatically. Now I'm in charge of what goes into the index and so I get to form my own commits the way I want.

like image 26
matt Avatar answered Sep 24 '22 08:09

matt