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 1 year has passed since last update.

作業ブランチで、メインブランチの変更を取り込む

Last updated at Posted at 2022-06-26

タスクをこなしていると、メインブランチの変更を取り込まずに作業ブランチへ分岐してしまうことや、作業中にメインブランチが更新されることがありがちですよね(?)

今現在いるブランチの状態のまま、メインブランチの変更を取り込むコマンドを備忘録的に残しておきます。

$ git fetch && git merge --no-ff origin/main
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 788 bytes | 87.00 KiB/s, done.
From github.com:himitudesu/himitudesu
   aeeaed9..2b64c5e  main       -> origin/main
Merge made by the 'ort' strategy.
 README.md | 1 +
 1 file changed, 1 insertion(+)

origin/mainmaindevでもなんでもいいです。

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?