将git diff设置为默认值 [英] Set git diff to a default value

查看:125
本文介绍了将git diff设置为默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前用 git config --global diff.external< diff-tool-name> 更改了我的git diff工具。我决定我不喜欢那个工具,并希望切换回来。



我尝试了一下,并做了如下操作: git config --global diff.external git-diff 。现在调用 git diff 来查看未分离的更改会产生:

  fatal:ambiguous参数'48e66b706d21398f28240810e7fc0d44d8f92d99':未知的版本或路径不在工作中tr 
使用' - '分隔路径与修订版
外部差异死亡,停在somefile.ext。

如何设置我的 git diff 命令使用git附带的默认命令行git diff。例如:

git config --global diff。



然后是什么?

解决方案

尝试

git config - global --unset diff





git config --global --unset diff.external



请参阅 git config 了解更多详情。


I previously changed my git diff tool with git config --global diff.external <diff-tool-name>. I decided I don't like that tool and wanted to switch back.

I tried meddling around and did something like: git config --global diff.external git-diff. Now calling git diff to see unstaged changes yields:

fatal: ambiguous argument '48e66b706d21398f28240810e7fc0d44d8f92d99': unknown revision or path not in the working tr
Use '--' to separate paths from revisions
external diff died, stopping at somefile.ext.

How do I set my git diff command to use the default command line git diff that came with git. Something like:

git config --global diff.

and then what?

解决方案

Try
git config --global --unset diff

and

git config --global --unset diff.external

See the explanation of git config for further details.

这篇关于将git diff设置为默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆