how to fix the error in 'git submodule update' -
i have super project named root , submodule named subb on have no write permission. want git new branch in machine . when run "git submodule update", error :
"fatal: reference not tree: b4ec396a0e1da795a5187f7acf90f686c23c6940 unable checkout 'b4ec396a0e1da795a5187f7acf90f686c23c6940' in submodule path 'subb'". tried kinds of ways resolve issue failed. can answer following questions me , thanks:
- does ref 'b4ec396a0e1da795a5187f7acf90f686c23c6940' means local commit in submodule subb? see info 'git log b4ec396a0e1da795a5187f7acf90f686c23c6940' in submodule directory 'subb', in super project see nothing same command.
- the ref means commit in local sumodule repo? because have no write permission remote repo. sure on local. buy why error occurs when update in machine. remote repo should have no idea local commit!
- how resolve issue?
it means commit b4ec396 done in subb
, not pushed in origin/subb
(the upstream repo subb
).
however, parent repo has recorded gitlink (special entry in index), , pushed origin/root
.
on other machine, when parent repo root
cloned, cannot checkout subb
, because references sha1 not present in origin/subb
.
Comments
Post a Comment