Question

I would expect git diff to work like git add and others, in being able to do something like

git diff **/models.py

rather than having to do

git diff /full/path/to/my/python/file/called/models.py

It's strange though because

git commit **/models.py
git add **/models.py

both work as you'd expect.

Was it helpful?

Solution

git diff [options] [<commit>] [--] [<path>...]

Example

git diff -- */models.py

http://kernel.org/pub/software/scm/git/docs/git-diff.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top