Rename a git submodule

前端 未结 7 2175
-上瘾入骨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:22

    MacOs: When I wanna use VonC solution to change submodule folder Common to lowercase:

    git mv Common common
    

    I get

    fatal: renaming 'Common' failed: Invalid argument

    Solution - use some temporary folder name and move twice:

    git mv Common commontemp
    git mv commontemp common
    

    That's all :)

提交回复
热议问题