

Ask HN: Best emacs / git integration? - jashmenn

The git wiki lists no less than 6 different ways to integrate git with emacs: http://www.emacswiki.org/emacs/Git . Fortunately, I haven't picked one yet so I hope to benefit from your collective experience.<p>Here's the current list:<p>* Magit
* Egg
* egit
* Gitsum
* git-emacs
* GitDwim<p>Which is better maintained, easier to use, feature complete, makes common things easy, etc.?<p>Which plugin do you use for git integration for emacs?
======
madhouse
I'm using Magit, it's perfectly fine for my uses (commit, merge, rebase,
stash, and branching - usually very little deep plumbing).

It has good documentation, I can only recommend it.

Sadly, I can't compare it to the others you listed, as Magit was the first one
I tried, and never felt any need to try another.

~~~
davnola
Magit for everyday use because buffers are split into expandable/collapsible
sections which makes navigation a breeze (e.g. for adding hunks)

vc-annotate is a great interface for git-blame (Magit doesn't have this). vc-
annotate-next/prev-revision are seriously handy.

Magit's interface for interactive rebase (bound to E in magit-status window -
this is not in the latest docs) is not so handy. I tend to drop down into
shell.

Make sure you have git core editor set to emacsclient -c of course.

~~~
daemianmack
Perfect; I was just looking for vc-annotate-next today.

Magit user here. I love it for its ability to let me do line-level control
over what I place in the index. I use the prompt for deep surgery but for
general coding/logging/commit-bundling, I haven't found anything better.

The documentation for it is great. I wanted something a little more breezy for
quick task-centric scanning and made this...

<http://daemianmack.com/2009/09/24/magit-cheatsheet/#>

Maybe it'll be useful to you.

------
surki
I starting using magit recently, but I am still to get used to it.

Here is a link discussing about git support in Emacs that I found useful:

<http://alexott.net/en/writings/emacs-vcs/EmacsGit.html>

------
andreaja
I'd like something that plugs into dvc-mode, but after my last foray with that
I've pretty much given up on doing my git stuff from any interface that isn't
the CLI.

Do any of these do decent integration with git-svn?

~~~
rmaccloy
Magit apparently has git-svn support, though I've never used it.

~~~
philjackson
Magit's git-svn support is very solid. I use it daily.

------
draebek
I most commonly use gitsum which is fast and easy and, in combination with
Emacs' diff-mode, lets me edit my pending commits all to hell. (In my
experience few other people like doing this.)

gitsum is really only good for committing, of course. When I want to do other
Git operations I most commonly just go to the command line. If I have to do
them from inside Emacs I've found Magit to be usable, DVC as well (though I
haven't needed it in my latest Emacs install; I only have Magit currently).

------
rmaccloy
gitsum is an add-on, not a full-featured git mode; so is git-dwim, I believe,
although I don't use it personally.

Recent Emacs have git support in VC; I tend to just use that since I tend to
do anything other than committing (rebasing, switching branches, merging,
pushing, etc.) in a terminal.

------
misterm
What about running a command prompt from within emacs? I spawn one in my
.emacs file with: (shell).

~~~
wglb
Do you mean in order to run git from the command line within emacs?

(Within each emacs instance that I have open, i have at least one shell window
open, if not two.)

~~~
misterm
Admittedly, there seem to be better solutions out there, but I suppress the
"start" page in my .emacs file and start with an empty scratch buffer, or a
shell prompt instead. I can just switch the buffer to use the prompt.

------
jcapote
Egg is awesome, it's a fork of magit, so if you're already using that you'll
feel right at home

~~~
nimms
+1 this. I've switched from magit to egg and couldn't be happier. Makes
working with git a breeze

~~~
birdman
you two have almost motivated me to try switching. do you have an example of
what you like better about it?

