User-specific files added to git repository for new Xcode projects

Originator:ralf.ebert
Number:rdar://22027868 Date Originated:28-Jul-2015 12:12 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A165t)
Classification:Other Bug Reproducible:Always
 
Summary:
Since Xcode 7, user-specific project files like xcuserdata are added to git repository for new Xcode projects by default.

Steps to Reproduce:
1. Create a new iOS Application Single View Application Project and check the "Create Git repository" option in the project location dialog.
2. Check the files included in the initial commit, for example by running "git show --name-only" in the project folder.

Expected Results:
No user specific files included in the commit.

Actual Results:
Since Xcode 7, user-specific files are included in the initial commit, f.e.:

Flashcards.xcodeproj/project.xcworkspace/xcuserdata/ralf.xcuserdatad/UserInterfaceState.xcuserstate
Flashcards.xcodeproj/xcuserdata/ralf.xcuserdatad/xcschemes/Flashcards.xcscheme
Flashcards.xcodeproj/xcuserdata/ralf.xcuserdatad/xcschemes/xcschememanagement.plist

Regression:
In Xcode 6, such user-specific files were not included in the commit.

Notes:
- I would not commit such user-specific files to a Git repository for an Xcode project because they don't seem to hold substantial information and can be easily recreated / would only bloat change logs. It's common best practice to not commit them / ignore them using a .gitignore file (example: https://www.gitignore.io/api/xcode,osx )
- It would be great if Xcode would create a reasonable .gitignore file for new projects with git repository, excluding at least xcuserdata + .DS_Store files.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!