问题
I created a Workspace in Xcode 4.4 and an initial project. All works perfectly well. Source control with git is fine. When I add new projects with source code tracking enabled to the Workspace (using the + button at the bottom of the project navigator) those projects don't allow me to manage source control from the Workspace. Yet, those projects do get .git directories and command line git works perfectly well with them.
The first project initially added to the workspace continues to have source code working perfectly well. For example if I save changes to a file, the 'M' icon appears showing that the file has been modified. The Source Control menus work. All subsequently added projects behave as if they are not under source control.
If I close the Workspace and open the Projects individually, then source control works perfectly well.
Perhaps I am misunderstanding the correct way to work with Projects within a Workspace. Any help would be appreciated.
~chuck
回答1:
I've had the same problem with XCode 4.4 and I've solved it as shown in the follow steps list.
1 - Be sure to have your project working folder in the repositories list (in the Organizer - Repositories tab).
2 - If you already have the project shown in the list of projects under the workspace, delete it (only as reference)
3 - Use now the 'Add Files to "YOURWORKSPACE"...' under the File voice in the XCode menu and add the .xcodeproj project file (using the "Create folder references for any added folders" option).
Then you'll manage to use the "Source Control" menu and talk with your repository. ...this sounds to me like a bug because I have to repeat these steps every time I add a new project to a workspace.
Hope you can solve this way!
来源:https://stackoverflow.com/questions/12218966/xcode-workspace-source-control-only-working-for-first-added-project