Git Masterの内容をブランチに反映させる
Gitで、Masterの最新のソースを現在作業をしているブランチ(branch)に反映する方法を紹介します。
作業途中(修正途中)のソースがあればコミット(commit)しておきます。
まずは以下のコマンドでmasterブランチに移動します。
$ git checkout master次に、masterブランチの情報を最新にします。
$ git pull origin master次に、元いた作業ブランチに移動します。
$ git checkout 作業ブランチ名最後にmasterブランチの内容を取り込みます。
$ git merge origin masterまとめると以下の流れになります。
$ git checkout master
$ git pull origin master
$ git checkout 作業ブランチ名
$ git merge origin master