前回の続きです〜
前回まででmasterブランチの他に、hiyokoブランチを作成しました〜
今回はhiyokoブランチでの変更をmasterブランチへマージし、変更内容を統合していきます〜
masterブランチへマージする
①データの変更
まずはhiyokoブランチでデータを変更します〜
test.txtの最後の行に「ひよこ」という文字を追記します〜
あああああ
いいいいい
ううううう
ひよこ
という感じになったかと思います〜
次に変更情報をcommitします〜
$ git commit -a -m "3rd Commit" [hiyoko df92679] 3rd Commit 1 file changed, 2 insertions(+), 1 deletion(-)
これでhiyokoブランチには「ひよこ」の文字があり、masterブランチには「ひよこ」の文字が無いようになりました〜
②マージの実行
それではマージしていきます〜
まずはmasterブランチに移動します〜
$ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'.
今test.txtを見ても「ひよこ」の文字はありません〜
以下のコマンドを実行してマージして下さい〜
$ git merge hiyoko Updating 4023a1f..df92679 Fast-forward test.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
これでhiyokoブランチの情報が、masterブランチへ統合されました〜
test.txtを開くと、「ひよこ」の文字が入力されていると思います〜
それでは、今回はここまでです〜
ありがとうございました〜