简体   繁体   中英

Adding a second Git repository to existing xcode project

I inherited a codebase from a coworker who left the company. He designed a custom library to use with the code which he put in our company's github account. However, I don't know how to pull this library into the project on MY computer from github. I've managed to connect the project to the main code repository, but I don't know the step-by-step way to add the library. I don't have tons of experience using command line git, but if that's the only way, I'm willing to try it...

I have a project in XCode composed of 2 separate git repositories. One is for the main host app and the other is for a separate number crunching library used by the host app. The split was chosen as it would be nice to share the library as a more lightweight and independent body of code.

Just pull the separate library repository into a separate (not nested) directory on disk and then link to this library from the main XCode project by adding the source to the project. XCode will automatically show you when changes are made to either repo in the file browser. The project file layout and repositories are independent concepts. You could have a separate repo for every source file if you wanted to.

To pull the library on your local machine, first fork the repo to your own account and then pull it in using the instructions on the site . .

https://help.github.com/articles/fork-a-repo

If you modify the library, remember to commit from the library directory. When you push, you will update your fork.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM