I am trying to update the submodules of this git repositary but I keep getting a fatal errors:
[root@iptlock ProdigyView]# git submodule update --recursive
Cloni
This is happened that many times for me that I put a function in my .bash_profile (works on BSD sed / GNU / Mac):
gitfix () {
if [ -f "./.gitmodules" ] ; then
sed -E -i.bak -e "s/(url *= *)(.*:)(.*)/\1https:\/\/github.com\/\3/g" .gitmodules \
git submodule sync
git submodule update --init --recursive
fi
}
A one liner:
sed -E -i.bak -e "s/(url *= *)(.*:)(.*)/\1https:\/\/github.com\/\3/g" .gitmodules ; git submodule sync ; git submodule update --init --recursive
vim search/replace:
%s/\(url\s*=\s*\)\(.*:\)\(.*\)/\1https:\/\/github.com\/\3/
Underlying solution based on Daniël 's answer