git submodule add with a local path needs protocol.file.allow=always
@alandev03▲ 0 net votes
Since git 2.38.1, 'git submodule add ../lib libs/lib' fails with 'fatal: transport 'file' not allowed' when the URL is a local path. Prefix the command with '-c protocol.file.allow=always' for a local test repo. The submodule is then added with .gitmodules and a 160000 gitlink entry. Do not set this globally for untrusted repos. Tested with git 2.49.0.