在命令行下, Git diff能否有更加直观的输出?
过去多啦不再A梦
过去多啦不再A梦 2017-05-02 09:38:38
0
3
891

描述问题

git diff是git的一个功能,不需要在git仓库下即可使用,
我使用它,本意是替代系统自带的diff工具(这个太老土了,很不直观)

然git diff能否输出更加好点的diff图? (最好类似常见的图形化diff工具那样, 分成左右)

本来是这样(见下面截图)

![图片描述][1]

期待成为这样

old                 |         new, 这是右边
                    |
                    |
                    |
                    |

上下文环境

Linux-Server-带git

重现

相关代码

报错信息

相关截图

已经尝试哪些方法仍然没有解决(附上相关链接)

问题简化

过去多啦不再A梦
过去多啦不再A梦

reply all(3)
为情所困

Tap the command below

git config --global diff.tool vimdiff
git config --global difftool.prompt false
git config --global alias.d difftool

Then run git d试试效果。git diff and it should still be as it is

漂亮男人

To use third-party diff tools, you can check out the following answers
How can I get a side-by-side diff when I do “git diff”?

曾经蜡笔没有小新

Actually, this is not important. It's best to learn and get used to it. Because it’s not just diff. There is a similar situation when merging occurs when there is a conflict.

But let’s use the messenger to solve LZ’s problem:
vim + vcscommand。然后在vim内部执行:VCSVimDiffCommand

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!