我犯了一个错误,将一个Visual Studio项目从2008升级到2010,而没有事先检查我之前的更改。正因为如此,我有一个巨大的系统生成的文件(10k+行),它每隔4行就会更改一次。
我通常很擅长经常签入东西,所以我通常只会使用向下键来滚动我的更改。在这种情况下,滚动浏览对系统生成的文件所做的更改需要几个生命周期。
有没有一种方法可以在你完成git diff
之后跳到下一个修改过的文件,这样你就不必滚动浏览每个文件上的每个更改?
发布于 2015-08-14 02:20:33
对于其他有用的命令,请键入h
以获取帮助(当处于git diff
中时,该命令位于less
中)。
特别是:
JUMPING
g < ESC-< * Go to first line in file (or line N).
G > ESC-> * Go to last line in file (or line N).
p % * Go to beginning of file (or N percent into file).
t * Go to the (N-th) next tag.
T * Go to the (N-th) previous tag.
{ ( [ * Find close bracket } ) ].
} ) ] * Find open bracket { ( [.
ESC-^F <c1> <c2> * Find close bracket <c2>.
ESC-^B <c1> <c2> * Find open bracket <c1>
发布于 2012-11-20 08:14:08
另一种选择是调用update-index
命令,并告诉它假装一个巨大的文件没有更改。这里有一个更完整的here示例。
发布于 2021-12-16 17:03:30
我认为你想要:
:n * Examine the (N-th) next file from the command line.
在less
帮助中可以看到这一点。
CHANGING FILES
:e [file] Examine a new file.
^X^V Same as :e.
:n * Examine the (N-th) next file from the command line.
:p * Examine the (N-th) previous file from the command line.
:x * Examine the first (or N-th) file from the command line.
:d Delete the current file from the command line list.
= ^G :f Print current file name.
https://stackoverflow.com/questions/13464540
复制相似问题