How to do git commits in Emacs buffers

My guess is that your environment variable $EDITOR is declared as emacs. Since you're not running Emacs as a daemon, it starts a new instance of it. To remedy this you have two options:

  1. configure your $EDITOR to use Emacsclient

  2. use egg or magit, Git frontends for Emacs.
    Egg has a bit of hand holding, since you can see the shortcuts, but Magit is more actively developed.


I like all my compilation and git/magit messages to appear in the same window in the same frame that triggered the message.

Check out the vars same-window-regexps and same-window-buffer-names as I think that's what you might be looking for.

Here is the setting I use:

(setq same-window-regexps (quote ("\*vc\-.+\*" "\*magit.+\*" "grep" "\*compilation\*\(\|<[0-9]+>\)" "\*Help\*\(\|<[0-9]+>\)" "\*Shell Command Output\*\(\|<[0-9]+>\)" "\*dictem.*")))

Hope that is helpful.

Damon

Tags:

Emacs

Git

Eshell