Say you’ve got another git repos of one xcode project (like a library) and you want to build and compile it in another. Here is how you include the library xcode project in your new xcode project.

Step 1: Set up git submodule

Get the name of the git repos you want to include and add it as a submodule

git submodule add git@ghe.xxx/yyy.git /externals/name
git submodule update --init --recursive

This adds the external repos to your project, and then updates it.
Go here for more details.

http://stackoverflow.com/questions/2140985/how-to-set-up-a-git-project-to-use-an-external-repo-submodule

Step 2: Drag in your project

Now open finder, and drag in your external project folder from your submodule folder. Not somewhere else on disk.

Screen Shot 2016-02-24 at 10.22.41 AM.png

Doing this will add the subproject to your new project, while also creating the necessary schemes to build your external project as a library with your new one.

Screen Shot 2016-02-24 at 10.22.53 AM.png

You can now flip back and forth between schemes and edit as required.

Happy coding!