Search code examples
xcodegitversion-control

Version control in Xcode Project


I am going to use a version control system like Github.

My project is an Xcode project and I am not sure which files should be excluded when I commit to the repository.

  • Should I commit "Pods" folder?
  • Should I commit "xcodeproj" and "xcworkspace"?

Solution

  • Well if there are multiple developers, it's better to avoid xcworkspace file because when there are multiple build version or bundle identifier, it's likely to get a conflict. A conflict in the xcworkspace file won't open any files inside the project until and unless you resolve the conflict. You'll have to use merge tool or some other tools to resolve the conflict. Hence better to avoid xcworkspace file. It's fine to commit the pods folder.