LoginSignup
0
0

More than 3 years have passed since last update.

CurrentBranchにMasterBranchの情報を反映させたい

Last updated at Posted at 2020-05-14

背景

チーム開発において自分の作業ブランチにマスターブランチの情報をもってきたい!!
だけどどうすればいいかわからない、、、

そんなときの解決策を今回は紹介します。

以下の4つのコマンド実行するだけです。

コマンドを実行する前の注意点として、編集途中のファイル等がある場合は、一度コミット&プッシュして何もない状態にしておきましょう。


<!-- 開発中ブランチからmasterブランチへ移動 -->
$ git checkout master

<!-- リモートのmasterを反映 -->
$ git pull origin master

<!-- masterブランチから開発中のブランチへ移動 -->
$ git checkout 開発中のブランチ名

<!-- maserの内容を開発中ブランチに取り込む -->
$ git merge origin master

以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0