【问题标题】:why is vc-git and magit in emacs ignoring my git config settings?为什么 emacs 中的 vc-git 和 magit 忽略了我的 git 配置设置?
【发布时间】:2012-09-07 14:46:45
【问题描述】:

我正在使用 magit 运行 emacs 24.1.1 的官方 windows 二进制文件。当我提交一个文件时,日志中显示的用户名和电子邮件是从我的帐户和机器名称中提取的,而不是使用在全局 git config 或此 repro 的本地设置中设置的值。

通过 git bash 和 dos,我可以向 git 询问 user.email 和 user.name 并获取本地重现设置。

magit 和 vc-git 的 diff 模式似乎也忽略了我的 autocrlf 设置,所以这可能是一个 emacs 范围的问题,而不是特定于 magit。

C:\Program Files (x86)\Git\cmd 在 emac 的 exec-path 上。

如何指示 magit 找到正确的设置,或者手动告诉它设置是什么?

【问题讨论】:

    标签: windows git emacs magit


    【解决方案1】:

    您可以添加一个 HOME 环境变量并指定与 .gitconfig 目录相同的目录。

    【讨论】:

      【解决方案2】:

      您可能希望控制您的 $HOME 从 Emacs 的角度和您的 shell 的角度来看是相同的。很可能它们并不相同,因此在 Emacs 中找不到 $HOME/.gitconfig。

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-20
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-22
      相关资源
      最近更新 更多