119
93

More than 5 years have passed since last update.

submodule の向き先 url を変更する

Last updated at Posted at 2014-09-15
  • .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
119
93
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
119
93