1

I had an xcode project that contained a submodule. I renamed my project and renamed the directory where my project lives. Not I am trying to git init, but getting the following error.

Not a git repository: RestKit/../.git/modules/submodules/RestKit
jdog
  • 10,351
  • 29
  • 90
  • 165

1 Answers1

0

First, why doing git init, and where? I would understand a git submodule init.

Second, as mentioned in the comments of "Rename a git submodule":

.gitmodules contains no absolute path information.
However {submodule}/.git and .git/modules/submodules/{submodule}/config do

So check the content of the ResKit/.git/config and see if there is a path that needs to be updated.

Or try and do a git deinit ResKit, followed by a git submodule update --init

Or do the manual version of the previous process: delete .git/modules/submodules/ResKit, and try again git submodule update --init

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • So do a git submodule in the main directory instead of git init? I need to get the project in so what I did was deleted the .git file out of all the submodules. That let me git init and git add, but of course my submodules connection to its git repo is blown away. But I haven't update the RestKit library in a year anyway. – jdog Aug 09 '14 at 22:55
  • @jdog why did you delete all the .git? a submodule is there to record the SHA1 of a repo used by the main repo. – VonC Aug 10 '14 at 03:12
  • Because I needed to get the project into git and the app into the app store. I didn't have time to figure it out. I will try to fix submodules later. – jdog Aug 10 '14 at 03:56
  • @jdog then make sure to delete the `.gitmodules` file as well, or you will keep track of those submodules in your new "git init'd" repo. – VonC Aug 10 '14 at 04:04