I have a submodule in my master project, and I was working in a branch
of the master project. In this master project branch, I did the
- went into the submodule dir
- checked out a topic branch
- did a pull to get the latest on this topic branch
- went back to the root dir of the master project
- did a git submodule add for the submodule dir (without training /)
After this, all was fine. But, when I try to switch my master project
to an older branch, my git submodule update fails:
$ git submodule update
error: pathspec 'a4bb226053b9d7e803f37f1d9eb63d1b21869fd7' did not
match any file(s) known to git.
Unable to checkout 'a4bb226053b9d7e803f37f1d9eb63d1b21869fd7' in
submodule path 'lib/clojure/capjure'
Is this because I am working in two different branches in my submodule
master project (branch A) --> submodule (branch 1)
master proejct (branch B) --> submodule (branch 2)
Please note, that all branches and commits are on the central repo for
If I do a git checkout "sha" for the submodule, I can for the update
manually. This to me proves that commits are all there.
I'm assuming my workflow is bad. Can anyone tell me what I'm doing
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at