Inconsistent history

I noticed some strange behavior on one of my repositories where the history is not consistent when I go back a couple of commits. To illustrate that, imagine the following recent history:

commit6
commit5
commit4
commit3
commit2
commit1

When I check the state of the history after commit 4 (from github website), I get:

commit4
commit1

Has anyone ever seen anything like that?

Best,
Bertrand

Are there any merges involved in the history? After a merge git log will sort commits from the merged branches by time, so it might look like the histories of the branches were mixed. But the branching history is still there, if you look at the history of an individual commit you’ll see only it’s ancestors.