What Is The Git History Showing?

Answered

When I do

git log build.gradle 

the output matches what I see in the eclipse log and on BitBucket.

However, what I see in IDEA is completely different and I can't work out what is being shown.

There are lots of merge commits in my repo (from master to branch and from branch to master).

Is Git - Show History following the path back through the branches that were merged or something?

I can't work out how what I am looking at or how to toggle back to show the same as the command line.

1
1 comment

Hi,

File history in IDEA shows commits for which file was changed from all of the commits parents. So:

  1. Single-parent commits that changed the file are shown;
  2. Merge-commits where file was changed from both parents are shown.

We also follow file renames.

This is different from the default mode of "git log" command that "Simplifies the history to the simplest history explaining the final state of the tree. Simplest because it prunes some side branches if the end result is the same (i.e. merging branches with the same content)". Also by default renames are not followed.

The closest git command that shows similar result would be `git log --follow --full-history --simplify-merges` (but this still would leave some of the "empty" merges). There are currently no settings to change that.

--

Julia Beliaeva

1

Please sign in to leave a comment.