将 git diff 设置为默认值
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4955752/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set git diff to a default value
提问by axel22
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.
我之前用 .git 更改了我的 git diff 工具git config --global diff.external <diff-tool-name>
。我决定我不喜欢那个工具并想切换回来。
I tried meddling around and did something like: git config --global diff.external git-diff
. Now calling git diff
to see unstaged changes yields:
我试图插手各地和不喜欢的东西:git config --global diff.external git-diff
。现在调用git diff
以查看未暂存的更改产生:
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 diff
命令以使用 git 附带的默认命令行 git diff。就像是:
git config --global diff.
git config --global diff.
and then what?
然后什么?
回答by eckes
Trygit config --global --unset diff
尝试git config --global --unset diff
and
和
git config --global --unset diff.external
git config --global --unset diff.external
See the explanation of git config
for further details.
有关git config
更多详细信息,请参阅 的说明。