Fatal Error when updating submodule using GIT

后端 未结 8 1060
庸人自扰
庸人自扰 2021-01-30 08:45

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         


        
8条回答
  •  我在风中等你
    2021-01-30 09:15

    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

提交回复
热议问题