Hacker News new | ask | show | jobs
by pmoriarty 1857 days ago
Do you remember what you tried?

Yours has been literally the first negative comment out of hundreds of comments I've read about magit. It'd be interesting to learn what didn't work for you and why.

4 comments

I didn't like it, I have several friends who tried it and didn't like it. The main problem (for us) was that people said "Hey, this is so great you should use it even if you don't use emacs".

This is (in my opinion) terrible advice, as you need to be a fairly competent emacs users to use magit, else you will keep hitting weird situations you can unable to escape (as you don't know the emacs thing to do).

I use emacs and still struggled with it. The interface is not particularly emacsy.
Cherry pick is faster and easier for me in the CLI. I’ve read Magit’s documentation on Cherry pick dozens of times and I still have no idea what it’s doing. I think I have successfully done it in magit once, but now I don’t bother and just do it on the command line.

For everything else I absolutely love magit. The ability to stage and commit chunks in a visual fashion is an unbeatable killer feature!

I do cherry picks in magit by:

1. Check out target branch

2. l o (log other) source branch

3. Highlight commits from list you want to cherry pick.

4. A A to apply the pick (I typically throw a -x flag into there too)

Thank you! That workflow makes sense. We’ll see if I remember that next time I Cherry-pick.
The first odd thing is that magit runs in emacs' working directory, rather than the directory of the buffer you launch it in (my experience with most emacs commands is that they will take the cwd from the buffer). I'm going to have multiple git repos, and I usually only start emacs once, so this gets me almost every single time.

The submenus are also a bit overwhelming. I just wanted to stash my working tree, not be given dozens of options for how to stash! Emacs already has a way to signal that you want to give an option to a command, so this interface feels very un-emacsy. "M-x magit-stash" should just do the common thing imo. C-u M-- prefix if I want something fancy.

Another time, I fat-fingered a branching operation, and I spent a good five minutes trying to figure out how to fix it within magit, and then gave up and solved it in 30s from the cli

Magit always opens to the buffer's repo IME. I use dozens of repos simultaneously so I experience it daily.

EDIT: okay dozens overall, < dozen simultaneous

My experience is the same. Probably because I'm so used to git on the command-line already magit doesn't seem much benefit.

I just gave it a try:

magit-blame seems hard to read, I guess it's a limitation of emacs, or can it be configured to show the author name on the left of the line like CLI git blame?

I tried to find the equivalent of "git add --patch", but did not find it in the info manual.

> magit-blame seems hard to read, I guess it's a limitation of emacs, or can it be configured to show the author name on the left of the line like CLI git blame?

There are different styles available. While blaming a file, press B to open the popup, then c to cycle through them.

> I tried to find the equivalent of "git add --patch", but did not find it in the info manual.

That's just the entire staging workflow. You see a list of changed files, which you can stage per file. Or you can expand a file to its changed chunks using TAB, then stage chunk by chunk. Or you can select some lines in the chunk and stage only those.