Stupid Git Trick

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!

One thought on “Stupid Git Trick

  1. knarf says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>