2

I added this to my application:

https://github.com/fpotter/juggernaut-cocoa

In the instructions, it says:

If you have git 1.7+ git clone git://github.com/fpotter/juggernaut-cocoa.git --recursive

It doesnt say where to clone it, so I clone it in my Documents folder. Then I copy the AsyncSocket.h, AsyncSocket.m, WebSocket.h, WebSocket.m, SocketIoClient.h, SocketIoClient.m, JuggernautClient.h, JuggernautClient.m files to my project in a folder I created called juggernaut-cocoa inside vendor.

However, while the files work on my local machine, when i push to github they are never added. All I see is a little green folder:

http://i47.tinypic.com/2ajnkzl.jpg

But when I try to clone my repository from another computer, the files are not there, they were never added to git.

I then tried to clone their project into my Vendor folder, and then ran git submodule init but got this:

No submodule mapping found in .gitmodules for path 'Vendor/juggernaut-cocoa'
JohnMerlino
  • 3,900
  • 4
  • 57
  • 89

2 Answers2

0

Note that AsyncSocket.m, WebSocket.h, ... are all files of github.com/erichocean/cocoa-websocket, which is:

So if you modify anything in a sub-submodule, you would have to:

  • push those modif to erichocean/cocoa-websocket, but also
  • committing that repo id back in fpotter/socketio-cocoa (the parent repo of cocoa-websocket), and push that, and then
  • committing the new fpotter/socketio-cocoa repo id back in fpotter/juggernaut-cocoa (its parent repo), and push that...

So be sure that is what you actually want to do/ can do (since you need to have write access to those repo, ie be declared as a collaborator).

Regarding your error message, check No submodule mapping found in .gitmodule for a path that's not a submodule.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

If you manually copy files from another project into yours, they don't become part of your repo, unless you add them:

git add vendor/juggernaut-cocoa/
git commit

If you want to use a submodule instead, adding it is not done by manual cloning and then calling "git submodule init". Instead you simply call git submodule add.

First, cd to the root of your main project. Then

git submodule add https://github.com/fpotter/juggernaut-cocoa vendor/juggernaut-cocoa
git commit
SzG
  • 12,333
  • 4
  • 28
  • 41