Asked
Active
Viewed 2,159 times
-2
-
https://stackoverflow.com/search?q=%5Bgit-diff%5D+one+file – phd Aug 10 '22 at 08:38
-
`git diff master -- path/to/myfile.py` or `git diff master HEAD -- path/to/myfile.py` – phd Aug 10 '22 at 08:39
1 Answers
0
Here is what worked for me:
$ git diff origin/master:path/to/myfile.py path/to/myfile.py
Note that order does matter (master branch should come first)

OrenIshShalom
- 5,974
- 9
- 37
- 87