Added a new scheme corresponding to a test target in my xcode project. The new xcscheme file created is not getting reflected in git. Also doing a git status shows me nothing to commit, working directory clean .
Trying to add it through terminal by git add .xcscheme says
The following paths are ignored by one of your .gitignore files: MyProject.xcodeproj/xcshareddata/xcschemes/MyProjectTests.xcscheme Use -f if you really want to add them
On verifying my .gitignore file, its completely blank.
I went through posts which asks to make the schemes shared but it did not help. Went through this thread, Bitbucket not showing changes in themes directory . But for me, there is no .git or .gitignore files inside either of the .xcodeproj file or xcschemes directory.
How to remove these restrictions so that I can add the new xcscheme file to the repo or is there any other settings that I need to modify?
Choose Create Git repository on My Mac when creating a new project. Create a local Git repo for your existing projects not in version control by going to Source Control, Create Working Copy... . Select the projects to add to the local Git repo and select Create. Xcode creates a Git repo for your code and adds a commit with your project files.
If the Git path is not configured correctly, you could also receive the error “git is not recognized as an internal or external command, operable program or batch file”. You can try reinstalling Git for Windows to set the path automatically. Step 1: Open the Search utility and search for Control Panel. Then open it.
Copy the clone URL to the clipboard so that you can use it in Xcode to connect to VSTS. If you want to use SSH to connect to your Azure Repos/TFS Git repo, Set up SSH credentials and use the SSH clone URL when adding the remote for your local Git repo. Go to Source Control in Xcode and select Projectname -- master, then Configure...
Push your project Go to Source Control in Xcode and select Projectname -- master, then Configure... Select Remotes, then select the icon and choose Add Remote... In the Address field, paste the Git clone URL for your repo copied in the previous step. Go to Source Control, Push..., enter the branchname on origin to push to, and select Push.
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With