美文网首页
解决 git diff 之后的小麻烦

解决 git diff 之后的小麻烦

作者: iMark | 来源:发表于2016-10-28 17:33 被阅读571次

当文章写得比较长而且某次改动比较大的时候,使用 git diff 就必须 enter 多次才能够看完,或者我们可以选择 Ctrl + C 来终止当前进程。
但是无论我们选择上面两种方式中的哪一个都会遇到这个麻烦:我们不能再正常地输入命令了。

此处文章太长我们使用 Ctrl+C结束diff,但是不能继续输入命令了

解决之道

使用 Q 退出

使用Q退出之后一切正常

关于这里面的具体原理我没有查找过,待有空时候翻翻手册,如果恰好哪位读者知晓的,烦请告诉我,谢谢。

Solve the problem by myself
Here is a reflink 1.1.1.1. 命令diff用于比较两个文本文件或目录的差异. diff was used by Linus Torvalds to manage the source code of Linux kernel before he event git. If you are familiar with diff in linux command line, you will be very confident to quit comparision with q. Before you quit, any command is negleted, 'cause you're not working in "Terminal", the window is just an output device accepting no commands, but you can try !<command> (ref: 1.2.11. 无处不在的分页器).

相关文章

网友评论

      本文标题:解决 git diff 之后的小麻烦

      本文链接:https://www.haomeiwen.com/subject/sgseuttx.html