This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the git category.
Last Updated: 2024-11-23
git diff --name-only
This is useful if you have an old PR that haven't had master
merged in lately.
git diff master...topic
This will only show commits A,B,C here
A---B---C topic
/
D---E---F---G master
By contrast, wwo dots is the default in git diff. That is, if you do:
git diff master topic
# what you’ll get is the same as if you asked for:
git diff master..topic
Then you'll get output the difference from G to C (i.e. with effects of F and G).
https://matthew-brett.github.io/pydagogue/git_diff_dots.html