I'm trying to make my scripts work without cd'ing to the working copy, by
passing --git-dir and --work-tree to every git command.
It works for everything except submodules.
+ git --git-dir subdir/.git --work-tree subdir submodule add
subdir/submod
fatal: /usr/lib/git-core/git-submodule cannot be used without a working
tree.
`subdir` and `subdir/submod` are git repositories, already initialized,
with commits in them. `git submodule update` also fails with the same
message.
It seems that git-submodule ignores `--work-tree` and refuses to work if
the current directory isn't inside of the working tree.
Am I missing something? Is it possible to make git-submodule work without
cd'ing into the working tree?
git 2.24.0, Linux
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/77d8d552-e3b5-4680-83f9-1836abf11083%40googlegroups.com.