This was one of those dumb things that I should have figured out earlier.
If you use emacs for editing then you probably have a customized .emacs file. Even if you don’t, your system is probably loading a boatload of features for emacs.
I certainly have a ton of elisp that I use to make development easier.
So it just occurred to me that I don’t need any of that stuff just to edit a change commit.
So I added this to my shell rc file:
export GIT_EDITOR="emacs -q"
Now emacs pops up instantly and I don’t have to wait for all the elisp to load and initialize.
This probably works with other editors too.
Ciao!
Alternative solutions:
- start emacs server and set GIT_EDITOR to emacsclient
- directly commit from emacs with vc-mode
Personally, I use both. I have EDITOR set to emacsclient (various software
use EDITOR) and I commit from emacs.