且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么emc中的vc-git和magit忽略了我的git配置设置?

更新时间:2023-11-05 22:07:52

您可能希望控制您的$ HOME与Emacs的观点相同,并且从您的shell角度来看。有可能是它们不一样,因此在Emacs中找不到$ HOME / .gitconfig。


I'm running the official windows binary of emacs 24.1.1 with magit. When I commit a file, the username and email shown on the log are ripped from my account and machine name, rather than using the values set in either the global git config or the local settings for this repro.

From git bash and dos, I can ask git for user.email and user.name and get the local repro settings.

magit and vc-git's diff mode also seems to be ignoring my autocrlf settings, so this may be an emacs-wide problem, not specific to magit.

C:\Program Files (x86)\Git\cmd is is on emac's exec-path.

How can I either instruct magit to find the correct settings, or tell it manually what the settings are?

You might want to control that your $HOME is the same from Emacs point of view, and from your shell point of view. Chances are that they're not the same, hence $HOME/.gitconfig is not found in Emacs.