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.
More on Commits, branches and tags
How do you write a good commit message?BeginnerWhat is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?Beginner