* デフォルト以外のリモートブランチにpushする [#n4b41276]

 
*** デフォルトのリモートブランチにpushする [#n7f8e0ea]
 git push origin branch1 # (1)
 git push                # (2)

- 普通はリモートにローカルと同名のbranch1ブランチが存在し、そこにpushする。 (1)
- origin branch1を省略することもできる。 (2)

*** デフォルト以外の(別名の)リモートブランチにpushする [#q85e6c19]

 git push origin branch1:remote_branch2

- ローカルのブランチ名branch1:リモートのブランチ名remote_branch2 のように指定する。
- 「ローカルのブランチ名branch1:リモートのブランチ名remote_branch2」のように指定する。

*** 補足 [#p883c610]

 git push origin master        # (1)
 git push origin master:master # (2)

- 普段(1)のようにmasterへプッシュするが、
- これは(2)のように指定するのと同じ。

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS