开发者

Shortcut for specifying modified files as arguments to git diff

开发者 https://www.devze.com 2023-01-15 16:22 出处:网络
Given this result of git status: modified: path/to/file-1.txt modified: path/to/file-2.txt Is there a shortcut equivalent of this?

Given this result of git status:

modified: path/to/file-1.txt
modified: path/to/file-2.txt

Is there a shortcut equivalent of this?

git diff path/to/file-1.txt

Something like:

git diff {1}

So that I don't have to type the full path name.

I know git stash allows git stash show stash@{1}, so I 开发者_Python百科believe there's something similar for git diff, but I haven't found it yet.

Thanks.


Checkout git-number, or scm-breeze.


git stash operates on a stack whereas git diff does not. Hence the stack contents can be referred to, but not the other.

0

精彩评论

暂无评论...
验证码 换一张
取 消