问题
I am trying to push my source code to Visual Studio Team Services. When i push my code i got the following error from Xcode. The source control operation failed because the URL "https://test.visualstudio.com/DefaultCollection/_git/myProj" cannot be used with Git.
Things which i tried: 1.Create Remote origin with Remote Name: Origin, Location: "https://test.visualstudio.com/DefaultCollection/_git/myProj" 2.After commit i can't push my code
回答1:
Please check the following steps, to see whether you have missed anything:
- Create a local Git repo for your Xcode 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.
- Create a new Git repo in VSTS for your Xcode project. It seems you have created one - https://test.visualstudio.com/DefaultCollection/_git/myProj.
- Push your project. 
You can refer to the link below for more information:
https://docs.microsoft.com/en-us/vsts/git/share-your-code-in-git-xcode?view=vsts
来源:https://stackoverflow.com/questions/50265904/pushing-code-from-xcode-to-visual-studio-team-service