ブランチ間の差分を迅速かつ効率的に確認する能力は、コードの変更点を把握し、問題を早期に検出する上で有益です。ここでは、IntelliJ IDEAを使用してブランチ間の差分を簡単に確認する方法を紹介します。
目次
コミットの差分を確認

現在、 feature/testブランチ
で作業しています。mainブランチ
とのコミット差分を確認します。
Compare with ~ をクリックします。

それぞれのブランチだけに存在するコミット一覧を確認できます。
ファイル内容全体の差分を確認

現在、 feature/testブランチ
で作業しています。mainブランチ
とのファイル内容全体の差分を確認します。
Show Diff with Working Tree をクリックします。

ブランチ間で、どういったファイルが追加・変更・削除されているか確認できます。