0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have 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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?