Xcode has had Source Control support via git
for a long time. Somehow it’s amazing that even now, in its default configuration, you may find that all sorts of files that show up in your repos that you don’t want: .DS_Store
, xcuserstate
, build
, .ipa
files, just for starters.
You want to do the right thing, and you know or have heard that checking user-specific files, temporary files, or build products into source control is not the right thing. You want to avoid merge conflicts that result from files that frequently change. Or you’re just tired of doing something in your IDE, and suddenly your project has modified files to commit.
You should be able to tell Xcode that you want Source Control in your project, and it should handle everything the right way. But Xcode lets you down by not handling this correctly.
What do you do? The good news is that the solution is just a couple of steps away, by applying a gitignore file in your repo.