File protocol in GIT


I have run into a problem when I tried to add submodule into my project that is controlled by GIT. I got an error:

% git submodule add /submodule /project/submodule

fatal: transport 'file' not allowed
fatal: clone of '/submodule' into submodule path '/project/submodule' failed

The solution of this error is setting the global value always for file protocol in GIT like this:

git config --global protocol.file.allow always

That’s it!