Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What files of an Xcode project should I store in version control?

I'm new to Xcode and just found out that it stores a bunch of user information and other stuff in the project directory that I don't really need in version control or want to put up on Github. This is what an Xcode project basically looks like:

 1 AppName/
 2 ├── AppName
 3 │   ├── Base.lproj
 4 │   │   ├── LaunchScreen.xib
 5 │   │   └── Main.storyboard
 6 │   ├── Images.xcassets
 7 │   │   └── AppIcon.appiconset
 8 │   │       └── Contents.json
 9 │   ├── AppDelegate.swift
10 │   ├── Info.plist
11 │   └── ViewController.swift
12 ├── AppName.xcodeproj
13 │   ├── project.xcworkspace
14 │   │   ├── xcuserdata
15 │   │   │   └── user1.xcuserdatad
16 │   │   │       └── UserInterfaceState.xcuserstate
17 │   │   └── contents.xcworkspacedata
18 │   ├── xcuserdata
19 │   │   └── user1.xcuserdatad
20 │   │       └── xcschemes
21 │   │           ├── AppName.xcscheme
22 │   │           └── xcschememanagement.plist
23 │   └── project.pbxproj
24 └── AppNameTests
25     ├── AppNameTests.swift
26     └── Info.plist

My inclination is to just commit the AppName/ and AppNameTests/ and exclude the AppName.xcodeproj/ directory. What's the recommended way of doing this?

like image 704
volny Avatar asked Aug 08 '15 07:08

volny


1 Answers

You'll want to use a .gitignore file to specify which files you don't want to store in GitHub.

Here is how to create the file, and here's what should go in that .gitignore file.

like image 156
Michael Dautermann Avatar answered Oct 29 '22 19:10

Michael Dautermann