git diff branch master [-- <file>]
git diff feature/newsletter-widget master -- config.json
- branches can be separated with
..
git diff feature/newsletter-widget..master -- config.json
- in the latter case, if either branch is
HEAD
, it can be omitted
git diff ..master -- config.json
..
vs....
sth..master |
sth...master |
---|---|
changes between the tips of the sth and the master branches | changes that occurred on the master branch since when the sth branch was started off it |