LoginSignup
0
0

More than 1 year has passed since last update.

1つのローカルリポジトリで複数のリモートリポジトリを管理

Last updated at Posted at 2021-08-10

現在のリモートリポジトリを確認

$ git remote -v                                                                                                                                                                       
origin  https://github.com/toshiki-nakamura/XXXXX.git (fetch)
origin  https://github.com/toshiki-nakamura/XXXXX.git (push) 

リモートリポジトリの追加

git remote add <名前> <url>

$ git remote add hoge https://github.com/toshiki-nakamura/hogehoge.git
$ git remote -v 
hoge https://github.com/toshiki-nakamura/hogehoge.git (fetch)
hoge https://github.com/toshiki-nakamura/hogehoge.git (push)
origin  https://github.com/toshiki-nakamura/XXXXX.git (fetch)
origin  https://github.com/toshiki-nakamura/XXXXX.git (push) 

リモートリポジトリの削除

git remote remove <名前>

$ git remote remove hoge
$ git remote -v
origin  https://github.com/toshiki-nakamura/XXXXX.git (fetch)
origin  https://github.com/toshiki-nakamura/XXXXX.git (push) 
0
0
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
0
0