90
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

submodule の向き先 url を変更する

  • .gitmodules の向き先を新しい url に書き換える
[submodule "lib/hoge"]
        path = lib/hoge
-       url = git@github.com:8mamo10/old.git
+       url = git@github.com:8mamo10/new.git

  • この段階で .git/config を確認すると、まだ向き先が古いまま
[submodule "lib/hoge"]
        url = git@github.com:8mamo10/old.git
  • sync コマンドを叩く
$ git submodule sync
Synchronizing submodule url for 'lib/hoge'
  • .git/config の向き先が更新される
[submodule "lib/hoge"]
        url = git@github.com:8mamo10/new.git
  • 動作確認がてら submodule update でもしてみると、変更後の url から fetch してくれるはず
git submodule update
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
90
Help us understand the problem. What are the problem?