0

I have added a scheme in Xcode to manage staging or production phase of app.

On one my computer in the local directory I have next files:

enter image description here

Stacked Stage. xcscheme Stacked. xcscheme (for production configuration)

I have committed and pushed all changes and git status say that nothing to commit and all is up to date.

But when I pull it on another computer I see only one xcscheme:

enter image description here

I've tried to shift my gitignore file from the working directory and I committed one more time and push the files again. I have not noticed any changes which is connected to xcschemes directory in git status. But I have pushed it and no results.

How can I resolve this issue?

Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
  • Does this answer your question? [Git not able to recognise addition of .xcscheme files in xcode project](https://stackoverflow.com/questions/32753798/git-not-able-to-recognise-addition-of-xcscheme-files-in-xcode-project) – Muzahid Apr 22 '20 at 14:13
  • thanks @iMuzahid yea I already found it and answered here. Also I've added my septs to resolve that issues as it wonted me to commit changes in new branch. The answer is here and in the link you've provided. thanks for comment! – Matrosov Oleksandr Apr 22 '20 at 15:26

1 Answers1

0

I have found similar question here

I also answered it there with my experience:

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.
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277