Shortcut for specifying modified files as arguments to git diff
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.
精彩评论