0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

リモートmasterをローカルのブランチにmergeする時

0
Last updated at Posted at 2021-06-06

はじめに

ローカルの開発ブランチで作業を進めていたが、リモートのmasterが進んでいる場合に、開発中のローカルのブランチにmasterの差分をマージしたい時の方法。

何回もやり方を調べているのでメモ。

やり方

1.開発中のブランチの内容をコミット。

$ git commit -m "#xxx メッセージ"

2.masterに移動してpull。

$ git checkout master

$ git pull

3.開発中のブランチに戻る

$ git checkout [開発中ブランチ]

4.masterを開発中ブランチにマージ。

$ git merge 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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?