Rename a git submodule

前端 未结 7 2136
-上瘾入骨i
-上瘾入骨i 2020-12-04 05:32

Is there some easy way to rename a git submodule directory (other than going through the entire motion of deleting it and re-adding it with a new destination name).

<
7条回答
  •  伪装坚强ぢ
    2020-12-04 06:34

    I just tried a few of the suggested above. I'm running:

    $ git --version
    git version 1.8.4
    

    I found it was best to de-init the submodule, remove the directory and create a new submodule.

    git submodule deinit 
    
    git rm 
    
    git submodule add 

    At least that is what worked for me best. YMMV!

提交回复
热议问题