0

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:

  1. In Xcode: created a new project (called testRestKit) and included the option to 'Create local git repository for this project'.

  2. Added RestKit as a submodule as shown here.

  3. On remote server: created a new remote repo called "remoteRepo_RestKitTest" as --bare --shared=all.

  4. In Xcode: File > Source Control > Commit (Committed the changes Xcode wanted).

  5. 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!

Community
  • 1
  • 1
H_H
  • 605
  • 1
  • 9
  • 13
  • Some error messages would be helpful indeed. – flashfabrixx Feb 15 '13 at 19:55
  • I have added the error messages and attempted to reword the question for greater clarity. Looks better than first attempt. : ) – H_H Feb 28 '13 at 13:21
  • It seems like the second link is your best bet. I would start from scratch and create a new project and get that linked to your GitHub account first. Once that is working follow the steps for adding RestKit as a submodule. Although I haven't found much success with git submodules so you may save yourself a headache by just cloning the project into your repository and replacing it whenever RestKit gets updated with the latest and greatest. – saulpower Mar 02 '13 at 18:26

0 Answers0