Git: submodule init and update from different folder
- by jmccartie
Trying to write a deployment script, working on a repo in a different path. The "git-dir" flag seems to work fine for most commands, but not for submodule work. Am I missing a path directive?
Works:
git --git-dir=/tmp/repo_path/.git log
Doesn't work:
git --git-dir=/tmp/repo_path/.git submodule init
Error:
No submodule mapping found in .gitmodules for path 'path_to/submodule'
Much thanks for any help.