Git not able to recognise addition of .xcscheme files in xcode project

One thing I noticed that somehow .xcscheme file was added to the global git ignore. As suggested by other guys I did next:

  1. To find path of global git ignore file I used this git config --get core.excludesfile
  2. Then I opened it and checked for any .xcscheme
  3. I removed .xcscheme restriction (in my case it was file name + extension added to global git ignore ProjectName.xcscheme)
  4. Then I navigate to project folder via terminal and check git status
  5. Now I saw that I have one .xcscheme untracked file. I have added it via git add function and committed
  6. But when I switched to another branch I still could not applied .xcscheme to this branch.
  7. The solution was to open Manage Schemes and unselect and then select Shared checkmark next to my scheme.
  8. Now after git status I can see .xcscheme untracked file and can commit it to the new branch.

Just my experience of using answers above. Thanks all guys!


There are multiple places for gitignore settings. Check them all.

See the documentation such as http://git-scm.com/docs/gitignore


You'll need to go into the "Manage Schemes" view and check off the 'Shared' checkbox

'Product' menu -> Scheme -> Manage Schemes

That will create the shared scheme files. Next, you'll need to make sure the files are not ignored by git.

You'll need to remove 'xcshareddata/xcschemes' from your ignore file and add them to the repo

or just use

'git add -f MyProject.xcodeproj/xcshareddata/xcschemes'


even though this has already been answered... for me it was

make sure your scheme is set to "Shared". Schemes dropdown -> manage schemes -> check the "Shared" box for the schemes you want to commit

hope this helps someone :)