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

忘れ勝ちなのでメモエントリです。

登録済みのリモートリポジトリを参照、新規追加

ローカルのファイルパス*1の場合を例にします。

$ git remote -v #=> 登録済みリモートリポジトリ表示 [shortname]  [URI]
$ git add second ~/path/to/local/parent_repo/

リモートの名称変更、削除

名称変更

ブランチ参照名も変更されるようです。

$ git remote rename origne new

削除

$ git remote rm new

*1:Dropboxに親リポジトリを置くことが多いので