But IntelliJ doesn't show it correctly,
Yes it does.
Is there anything I am missing while reading the graph on IntelliJ?
Yes. Basically, you don’t know how to read a map. At least, this kind of map.
Remember the old joke? Topologically, a donut and a coffee cup are the same object. The same is true here.
Git history describes a directed acyclic graph of node parentage. If you look carefully you will see that on that basis your two screenshots are two perfectly valid ways of drawing the very same graph. They convey exactly the same node parentage information. And that is all that there is to convey.
The two drawings are, in other words, topologically identical. A little bending and stretching turns one into the other without any change in the node parentage indicated. Here is what the drawing says — in both screen shots (reading from the bottom up):
As we enter the picture from the bottom, a single chain of parentage represents both master and dev. I presume that you think of this as master.
On that same branch, Release 6020.
On that same branch, Release 3145.
Then a hotfix branch was created and the "Fix app crash issue" commit was created on it, followed by Release 3146. This is probably where you are confused. In right-to-left terms, this line of parentage is horizontally displayed at the far right in the first screenshot and in the middle in the second screenshot — but that is irrelevant because right-to-left (horizontal) position of a branch has no meaning whatever. It's still the same graph showing the same chain of parentage vertically.
The hotfix branch was then merged into master and also merged separately into dev. Thus we need to display three branches which are reduced to two, because the hotfix branch has now been merged into the other two and there will be no further development on it. The two branches are displayed in the right-to-left order master–dev in the first screenshot and in the order dev–master in the second screenshot, but as I just remarked, that's meaningless. It's still the same graph!
Development now continues just on dev: Await future(s), Minor refactor, and so forth. There is also further development on master but it is above the screenshots and is not shown.
So don’t worry, be happy. The two screenshots show the same thing and are both correct.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…