13
13

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.

git merge でコンフリクトした箇所がインデント変更したりしててお手上げなとき

13
Posted at

たとえば、topic ブランチで作業していて、 master にマージしようとしたときに、ブランチで変更した箇所を master でインデントを修正したりしてた場合、コンフリクトした行数が多くて目で見て手動マージが厳しい場合。

コンフリクトしている状態で、

git diff :1:index.html :3:index.html

のような git diff を実行するとマージするブランチのコンフリクトを生じる原因となった変更の差分だけが表示されるのでそこだけ適切な場所に手動でマージすればOK.

具体例が無くてすみません。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?