Compare a file between two branches
Shows the differences in a single file between two branches or commits.
git diff branch1..branch2 -- fileEdit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/git-diff.md), licensed under CC BY 4.0.