鉴于git status
的结果:
modified: path/to/file-1.txt
modified: path/to/file-2.txt
是否有相当于此的快捷方式?
git diff path/to/file-1.txt
类似的东西:
git diff {1}
这样我就不必输入完整的路径名。
我知道git stash
允许git stash show stash@{1}
,所以我相信git diff
有类似内容,但我还没有找到它。
感谢。
答案 0 :(得分:2)
答案 1 :(得分:0)
git stash
在堆栈上运行,而git diff
则不在。因此可以引用堆栈内容,但不能引用其他内容。