HCdev
HCdev

Reputation: 550

Github is setting up submodules where I don't want them

I have an issue with Git where I am attempting to add RestKit as a submodule and it is submoduling my actual code as well.. I've deleted and re-created but still occuring!

This is an image of my github repo...

The checkpoint repo is the one I want as NOT a submodule

Is this possible to undo? As I seem to keep having the problem when i init the restkit repo as a submodule using: git submodule add git://github.com/RestKit/RestKit.git

It takes my Checkpoint code and somehow turns it into a submodule too..

And the 'Checkpoint' submodule doesn't exist in the .gitmodules file either!

Upvotes: 1

Views: 84

Answers (1)

VonC
VonC

Reputation: 1323973

'Checkpoint' submodule doesn't exist in the .gitmodules file either!

That means Checkpoint has been recorded as a special entry

git ls-tree HEAD Checkpoint
 160000 commit c0f065504bb0e8cfa2b107e975bb9dc5a34b0398  Checkpoint

You should either reset to a commit where Checkpoint wasn't a submodule, or restore a deleted directory:

git checkout <treeish> -- /path/to/dir

(with <treeish> a commit where Checkpoint isn't a submodule)

Upvotes: 1

Related Questions