What is the difference between `git log --oneline --graph` and `--first-parent`?
IntermediateConceptCommits, branches and tags
Answer
--graph draws every commit including those from merged branches. --first-parent follows only the first parent of each merge, so on a main branch that uses merge commits you see one entry per merged PR. It is the best view of "what landed when" and works well with bisect --first-parent.
git log --oneline --first-parent main
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