2
2

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 3 years have passed since last update.

Github Desktopでコンフリクトを解消する

Last updated at Posted at 2021-01-26

コンフリクト解消

Image from Gyazo
これはコンフリクトが発生しています。
右上のResolve Conflictsをクリックすると、コンフリクトが起きているファイルを確認できます。

Image from Gyazo
<<<<<<< ユーザー管理機能から |======= までの囲まれた部分が、現ブランチでの変更点、
|======= から >>>>>>> master までがmasterブランチでの変更点です。
変更内容が重複しているため、「コンフリクトが発生してマージできない」状態になります。

解決法は「取り込みたい部分だけ残し、それ以外消す」です。
今回は現ブランチでの変更点を取り込みたいので、masterブランチでの変更点を消します。
皆様はご自分の状況に合わせて作業を進めてください。
Image from Gyazo
そして右上のResolve Conflictsをクリックすると、

Image from Gyazo
✔︎Resolvedに変わったのを確認し、
真ん中やや右上に現れた、緑色のCommit mergeをクリックします。

Image from Gyazo
すると、コンフリクトが解消され、マージできるようになります。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?