gpt4 book ai didi

git - 如何为 git diff 启用通配 rune 件路径?

转载 作者:IT王子 更新时间:2023-10-29 01:28:43 25 4
gpt4 key购买 nike

我希望 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

关于git - 如何为 git diff 启用通配 rune 件路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16921787/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com