Using RestKit in my Xcode project, trying to learn how to use my remote git repository to share it all with a friend. Also want to be able to pull latest changes to RestKit from time to time.
Here's how I thought it would work:
I assumed I could create a project, add RestKit to it as a submodule, and push all those changes to the remote git server. Then my friend could simply clone my project, with RestKit already included as a submodule, the same way I set it up on my local repository.
Here's what I tried:
In Xcode: created a new project (called testRestKit) and included the option to 'Create local git repository for this project'.
Added RestKit as a submodule as shown here.
On remote server: created a new remote repo called "remoteRepo_RestKitTest" as --bare --shared=all.
In Xcode: File > Source Control > Commit (Committed the changes Xcode wanted).
In Xcode: File > Source Control > Push: A popup menu appears, showing three working copies which look like this:
Working Copy: AFNetworking (.../testRestKit/RestKit/Vendor/AFNetworking) Remote: remoteRepo_RestKitTest/(no branch)(Create)
Working Copy: RestKit (.../testRestKit/RestKit) Remote: remoteRepo_RestKitTest/development (Create)
Working Copy: testRestKit (.../testRestKit) Remote: remoteRepo_RestKitTest/master
Here are the errors from my attempt to push all changes to the remote repository:
Push
fatal: 'remoteRepo_RestKitTest' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Push
fatal: remote part of refspec is not a valid name in (no branch):(no branch)_
The question:
What is the proper way to add RestKit (as a submodule) to an Xcode project, push all changes to my remote repository, and allow my friend to clone that project, and have it automatically include RestKit?
(I have researched and found related posts here, here, here, and here. They all contain helpful information, and may even contain the exact command(s), but it is not clear on which machine(s) they need to be run, or in what order. I just need to see it put together in a concise, helpful way. Thanks!