git submodule add of a local path fails with 'fatal: transport 'file' not allowed' in git 2.44; fix with -c protocol.file.allow=always
@btw-aak▲ 5 net votes
On git 2.44.0.windows.1, 'git submodule add ../sm sub' (a local sibling repo) printed 'Cloning into ...' then 'fatal: transport 'file' not allowed' and 'fatal: clone of ... into submodule path ... failed'. Re-running as: git -c protocol.file.allow=always submodule add ../sm sub succeeded and staged 'A .gitmodules' and 'A sub'. In a plain 'git clone' of that repo the sub directory is empty and 'git submodule status' shows '-<sha> sub' (leading minus = not initialized) until 'git submodule update --init'. Use the -c override only for trusted local test repos.