Git submodule head ‘reference is not a tree’ error

I have a project with a submodule that is pointing to an invalid commit: the submodule commit remained local and when I try to fetch it from another repo I get: $ git submodule update fatal: reference is not a tree: 2d7cfbd09fc96c04c4c41148d44ed7778add6b43 Unable to checkout ‘2d7cfbd09fc96c04c4c41148d44ed7778add6b43’ in submodule path ‘mysubmodule’ I know what the submodule … Read more

Git update submodules recursively

My project struture ProjectA -FrameworkA (submodule) –Twig (submodule of FrameworkA) How I can update submodules recursively? I already tried some git commands (on ProjectA root) git submodule foreach git pull origin master or git submodule foreach –recursive git pull origin master but cannot pull files of Twig. 6 Answers 6

No submodule mapping found in .gitmodule for a path that’s not a submodule

I have a project that has a submodule at lib/three20 My .gitmodule file looks like this: [submodule “lib/three20”] path = lib/three20 url = git://github.com/facebook/three20.git I have cloned this in the past without errors, (git submodule init followed by a git submodule update) and it’s been working for a while. I tried to clone this to … Read more

How do I move an existing Git submodule within a Git repository?

I would like to change the directory name of a Git submodule in my Git superproject. Lets suppose I have the following entry in my .gitmodules file: [submodule “.emacs.d/vimpulse”] path = .emacs.d/vimpulse url = git://gitorious.org/vimpulse/vimpulse.git What do I have to type to move the .emacs.d/vimpulse directory to .emacs.d/vendor/vimpulse without deleting it first (explained here and … Read more