I am trying to use the following git replace protocol while running npm install
,
git config --global url."https://".insteadOf git://
It works well if it is written in the global file (.gitconfig
inside user directory).
I wanted to move this .gitconfig
file to the repository folder so that it will be saved in the repository and entire team can use that as described in Storing git config as part of the repository. So i have moved it to the repository folder and executed with include.path
configuration. But it did not work. I tried to add this config inside .git/config
( with --local
flag instead of --global
) file as well and the result was the same.
It only works when the configuration is written to the global .gitconfig
file. Is there any restriction for this protocol that it will work only when set globally?