How to Handle Cherry-Picked Commits When Comparing Branches in IntelliJ?

已回答

Hello, 

I'm using IntelliJ's "Compare Branches" feature to compare branch_A with branch_B. Some commits from branch_A were cherry-picked into branch_B, but when I compare the branches, these cherry-picked commits show up as differences. IntelliJ lists them as "commit X doesn't exist in branch B," even though the changes are actually present in branch_B. The issue seems to arise because cherry-picking creates a new commit with a different hash.

This is making it difficult to get an accurate comparison of what has or hasn't been merged between the branches.

How can I compare branches in IntelliJ while accounting for cherry-picked commits? Are there any IntelliJ settings, plugins, or workflows that can handle this scenario better? Alternatively, are there Git-based command-line solutions that could help? I’m open to suggestions on improving my workflow or using external tools to address this issue.

Thanks in advance for your help!

0

Hi,

Please see: (you can use Not cherry-picked commits) 
 

 

0

请先登录再写评论。