How do I replace a git submodule with another repo?

后端 未结 6 1342
野性不改
野性不改 2020-11-28 02:12

How do I replace a git submodule with a different git repo?

Specifically, I have a submodule:

  • located at ./ExternalFrameworks/TestFramework
6条回答
  •  执笔经年
    2020-11-28 02:56

    These commands will do the work on command prompt without altering any files on local repository.

    git config --file=.gitmodules submodule.Submod.url https://github.com/username/ABC.git
    git config --file=.gitmodules submodule.Submod.branch Dev
    git submodule sync
    git submodule update --init --recursive --remote
    

提交回复
热议问题