I was using following answer: https://emacs.stackexchange.com/a/57535/18414 to set markdown on the .git/COMMIT_EDITMSG file.
(add-to-list 'auto-mode-alist
'("/\\.git/COMMIT_EDITMSG\\'" . markdown-mode))
My .gitconfig file, to open commit message with emacs:
[core]
editor = TERM=xterm-256color emacsclient -t -q
On my emacs-daemon magit-git was enable.
Now during the commit (due to some squash operations in git), I see the commit messag along with the opened magit-diff: window.
Example image:
When I check the major-mode it became Local in buffer COMMIT_EDITMSG; global value is fundamental-mode.
Afterwards, when I added into COMMIT_EDITMSG file and do C-s C-x, commit fails and I get following message:
fatal: could not read commit message: No such file or directory
But instead if I re-enable markdown-mode, save and exit there would be no error.
[Q] Is it possible to force markdown-mode during git commit?
