【git】カレントブランチをリモートにpushするコマンド

スポンサーリンク

カレントブランチをリモートにpushするコマンド

今いるブランチをリモートにpushするには下記コマンドを実行します。

$ git push origin HEAD

公式ドキュメントにも記載がありました。

git push origin HEAD
A handy way to push the current branch to the same name on the remote.

https://git-scm.com/docs/git-push

また、他のブランチをpushしたい場合は下のようにブランチ名を指定します。

$ git push origin branch_name