Interview Prep/Git & GitHub/Commits, branches and tags

How does `git log` decide commit order, and what do `--topo-order` and `--date-order` change?

AdvancedConceptCommits, branches and tags
Answer

By default commits appear in reverse chronological order by commit date as walked from the tips, which can interleave branches oddly when clocks differ. --topo-order guarantees children before parents with branches grouped, and --date-order shows no parent before its children but otherwise orders by timestamp. --graph implies topo order.

All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags