直接編集
.git/configを直接編集しちゃってもOK ????
[code]
[remote "origin"]
url = hoge@hoge.git.xxxx.xx:/xxxx/xxxx.git
url = fuga@fuga.git.xxxx.xx:/xxxx/xxxx.git
[/code]
これだと、remote_name 変えずにいっぺんにできて楽ちんだったりして ????
…ばらばらに散らばったメモをなんとかしないと…????
先ずはリモートリポジトリの確認(これはよく使ってた)
[code]git remote -v[/code]
リモートリポジトリの追加(複数登録するときとかも)
[code]git remote add remote_name ssh@git.xxxxxxx[/code]
リモートリポジトリを変更(これ今日知った…多分どこかで読んで忘れて他と思う)
[code]git remote set-url remote_name ssh@git.xxxxxxx[/code]
リモートリポジトリを削除
[code]git remote rm remote_name[/code]
※ これは、単にgit addの参照先を削除するだけで、サーバからは削除されないからね〜らしい
Note:
git remote rmdoes not delete the remote repository from the server. It simply removes the remote and its references from your local repository.(https://help.github.com/articles/removing-a-remote/)
参照
- Changing a remote’s URL – User Documentation
- Removing a remote – User Documentation
- gitのリモートリポジトリoriginのURLを変更する – kanonjiの日記
- リモートリポジトリの確認・編集・削除 – Qiita
WordPress REST API を使ってレーダーチャートを作ってみた
【希少!】A/C ファンモーターブラシスプリングリペア済み! (Golf Mk1 Cabriolet 1990 ~ 1993) 