Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望git diff能够像git add和其他人一样工作,能够做类似的事情
git diff
git add
git diff **/models.py
而不是必须做
git diff /full/path/to/my/python/file/called/models.py
这很奇怪,因为
git commit **/models.py git add **/models.py
两者都按您的预期工作。
git diff [options] [<commit>] [--] [<path>...]
例子
git diff -- */models.py
http://kernel.org/pub/software/scm/git/docs/git-diff.html