Messy commit histories with lots of needless merge branches just get confusing when trying to work backwards and work out what happened.

To resolve this issue, it is strongly recommended to utilize git rebase to simplify merge histories in a way as such it produces the illusion the merge never happened, and was never needed, as all the commits simply happend after all the other commits they were going to be merged into.

But the subject of git rebase is far too complex to summarise in this one document, at least for now, so you should use other online sources to learn this.

1. Git Rebase related Articles