

Using Emacs and Git with Magit 2.1 - ScottWRobinson
http://lwn.net/Articles/649535/

======
mannimow
Magit is so good, I nearly forgot how to use git commands anymore.

Navigation is intuitive, diffs are great, discarding and commiting hunks is
superb, and it's snappy. It's really an outstanding interface for git!

~~~
branchless
> I nearly forgot how to use git commands anymore

This is my one fear. I am however willing to put up with this decay given the
increase in productivity. It's up there with org-mode as an emacs feature.

~~~
sandinmyjoints
After more than two years using Magit, I can only think of one instance when I
didn't recall a git command when I needed it. It took about 5s of googling to
find.

You can always see what command Magit is running behind the scenes by hitting
`$`, in case you're curious -- I've learned a few things this way.

~~~
branchless
Yes I agree and the mappings are largely one to one. As you say magit-process
with $ is great.

Next up to play with: whazzup.

------
kzar
For anyone who loves Magit as much as me there's a donations page
[http://magit.vc/donations.html](http://magit.vc/donations.html)

------
peterhadlaw
I appreciate how Magit isn't something that takes away from the git experience
by holding your hands like a GUI might. Magit is just an efficient interface
that in the end is just like using standard git in the command line.

~~~
toufka
As someone coming from a different discipline, git is tricky. Why would you
_not_ want to take away from that tricky experience by having a GUI? I
understand the power of git, but it's really hard to use coming from a user's
perspective, especially if you're working in less command-liney languages. I'd
love to have a gui for git!

------
rurban
I just switched from command-line foo to magit today (export
GIT_EDITOR=emacsclient) by accident, and I'm very surprised how much easier it
is now to solve complicated rebase scenarios. I'm a very sceptical emacs user,
who prefers the terminal over M-x shell and friends.

Once I got used to the few keys, it is much better than anything else I saw
before, and much faster than doing it manually.

Moving picks up or down with one key, killing it, fixup, squash, inspection,
... all with one key.

~~~
adamrt
i wanted a terminal in emacs that was as standard as possible and created
'sane-term'. Just ansi-term with a couple useful features. Sorry for the plug

~~~
rurban
Just tried it, it's awesome. It could persuade me. Everything just works
naturally.

------
duncan_bayne
I have used many Git UIs over the years, and Magit is the first one that lets
me work with greater speed and safety than just using the command line.

------
chetanahuja
Magit is love. Magit is life. If you're an emacs and git user but don't use
magit, it's a big, big waste of the powers of emacs.

------
jmount
Anyone able to help me out here? How do you get it to install? I tried the
Melpa instructions and added the following to my .emacs:

    
    
      (require 'package) ;; You might already have this line
      (add-to-list 'package-archives
                   '("melpa" . "http://melpa.org/packages/"))
      (when (< emacs-major-version 24)
        ;; For important compatibility libraries like cl-lib
        (add-to-list 'package-archives '("gnu" .   "http://elpa.gnu.org/packages/")))
      (package-initialize) ;; You might already have this line
    

I bounced emacs, it seemed to come back up okay. But (emacs 24.5.1 OSX) when I
type "M-x package-install" it claims magit [No Match]

I use emacs- but I don't tend to customize it much.

~~~
adamrt
Try "M-x package-list-packages" to see a list and then find it. If it's not
there then your package setup is incorrect.

~~~
jmount
That did it, thank you.

~~~
gtchessplayer
M-x package-refresh-contents

do this periodically to get your list updated w/ new packages and the latest
releases.

------
wwkeyboard
I really live having good formatting and spell check in the commit messages.
It's much nicer than the `git commit -m "blah"` messages. Sure I could use
another GUI, but magit is very easy when I'm already in emacs.

~~~
tanderson92
Perhaps you do not know, but if you leave off the -m switch, git will launch
$EDITOR with a commented list of files changed, where you can write your
commit message.

~~~
deltaprotocol
Perhaps he did not know, but I find that a lot of developers, especially those
not using GUIs, end up using -m every single time and writing poor commit
messages. With Magit, at least in my experience, you are more inclined to
write better commits.

If you give developers a "lazy" option, a lot will default to it, which isn't
ideal. -m is an alternative for a quick commit and end up being front and
center when using the CLI.

~~~
josteink
> With Magit, at least in my experience, you are more inclined to write better
> commits.

I have flyspell-mode enabled for git-commit-mode. Avoids embarrassing typos in
my git commit log.

It's little stuff like this adding up, making Emacs too great to ever be
without.

------
iamthebest
My experience with Magit:

I played around with it, and didn't see any advantage over using git commands.

Then I tried pushing a change. I was expecting some confirmation on what
refspec to use... but no! Magit pushed my change directly to refs/heads
instead of refs/for, completely bypassing gerrit code review.

I got burned. That was it; I'm never using Magit again.

~~~
PuercoPop
So you didn't read the manual or at least the help for the command you were
about to use and blame magit for not doing what you expected?

As with many emacs commands you use C-u if you want to specify the refspec to
push to.

~~~
kzar
Or with the new version it's `P o` (Push, other).

