Windows 10, Emacs 25.1, Magit.

I get this kind of message:

And I can't do any command on Emacs. Always show this message.


Or for those who have difficulties reading such tiny text:

Error in post-command-hook (magit-auto-revert-mode-check-buffers): (file-error "Spawning child process" "Exec format error")

  • What is the output of M-x emacs-version, and what is the output of running git --version at the command line.
    – npostavs
    Nov 29, 2017 at 23:13
  • "GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-11-16" and "git version 2.13.0.windows.1"
    – Alex
    Nov 30, 2017 at 7:57
  • 2
    Hmm, I thought it could have been a problem 32 bit Emacs calling 64 bit exe, but you have a 64 bit Emacs. Try putting (setq magit-auto-revert-mode nil) at the top of your .emacs. This should let Emacs mostly function normally since you will no longer get errors after every command. Probably you would still get error when using magit. Use M-x toggle-debug-on-error to get a backtrace and add it your question.
    – npostavs
    Nov 30, 2017 at 10:13

2 Answers 2


This is due to some misconfiguration and/or incompatibility between the components expected to work together that has nothing to do with Magit - it just happens to show up in this context. Fixing it from a distance is hard without further help from the affected user.


I got this error when I added global-auto-revert-buffers to the .emacs file through the customization menu. I could not exit Emacs either with C-x C-c or from the menu or the window frame. I had to kill it from a terminal. When I restarted it, everything was fine again and buffers automatically reverted when I switched git version control branches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.