Live data from Hacker News

Magit, the magical Git interface (2017)

emacsair.me

71–80 of 357 posts

Re: Magit, the magical Git interface (2017)

#71
post #16

Earlier quoted context omitted.

I recently tried out spacemacs and doom on too different new computers but I just couldn’t make them work for me. Maybe if I was coming to emacs from VIM they’d make more sense. I’d recommend that if you want to do emacs from scratch it’s probably easier to just start Witt vanilla and build up your own config. The hardest part is the muscle memory but you’re going to have that with spacemacs/doom too and then you’ve…

You can switch Spacemacs and Doom into Emacs-mode keybindings. Command key sequences become hidden behind a shortcut and modes are disabled. It relaxes the learning curve.

> You can switch Spacemacs and Doom into Emacs-mode keybindings.

Aware of this, and tried it. However much of these distributions is streamlined towards EVIL keybindindings so you don't really get the full experience. Furthermore, a lot of the Emacs keybindings have been opinionated, which again isn't bad but a little jarring.

Also the vi keybindings tend to reactivate every now and again, and often you can take a few goes to realise this as you fumble in frustration and lose your train of thought.

> It relaxes the learning curve.

Yes but you'll have a learning curve either way, and by the time you've passed it you'll know neither vim nor emacs, and you won't get to experience the joy of tailoring your own development experience nor will you have be able to make use of much of to the decades of support content that's available on the web.

As I said, it makes more sense if you've already worked with VIM and want to have the best of both worlds but even then I think you're still missing out on some of the finer experiences Emacs has to offer.

Re: Magit, the magical Git interface (2017)

#72

Tip of the day: you can have `magit` as a fast and standalone tool by using this script (require emacsclient to be setup properly): #!/usr/bin/env bash emacsclient -c --eval "(progn (magit-status) (delete-other-windows))" This will open the repository under the current path in a maximized magit window. The only downside I have for now about magit is when using `pre-commit` it can run for long sometimes, so it would b…

You should just be able to hit `$` in the magit buffer to watch the output.

Re: Magit, the magical Git interface (2017)

#73

For the sake of discussion, can we get some contrarian views? I'm using magit, along with tig, plain git and sometimes (!) even plain "vc", depending on context. I'm in the camp that thinks it's ok and it's pretty comfortable to use within emacs, but I don't see the earth shattering praise I see every time it's mentioned here. Tig for example is so much faster for history and blame perusal that I find it faster to ke…

I use emacs and git, and never got on with magit. Not entirely sure why, but here's a braindump: - I generally dislike layers on layers; while I seriously hate the git UI, I'd rather learn that, as it's a more portable skill, than learn another UI, that relies on emacs and a package installed. First thing I do on e.g. a new cloud instance is clone a bunch of stuff, and often work on an under-setup machine for a while…

> - I tried magit and just didn't get it. I couldn't couldn't find a happy path where I thought, "ah yes this is niice".

I mostly use plain git instead of Magit, for more or less the same reason, although I like git's UI.

I did find a happy path, though. Magit's blame interface is very nice to recursively call git-blame and navigate history of pieces of code. I ended up making a CLI program to improve git blame[1] so that I didn't end up switching to Magit just for that, but doing git-blame from Magit is still better.

[1] https://github.com/jolmg/git-reblame

Re: Magit, the magical Git interface (2017)

#74
post #9

Magit is an exceptionally well made interface to Git. Yes, it’s built on top of Emacs, and that might stop many from even looking into it. - I am glad I made a deep dive into Emacs last year, and although I stopped using it as an IDE (VS Code is just too good), I still come back to it because of Magit (and macros, general text editing and org-mode). Yes, I have an interface for Git in VS Code as well, but it‘s very r…

VSCode with Gitlens is the best git GUI experience I've had. I prefer most operations via git cli, but for commiting partial changes and merge conflicts, it's everything I could ask for.

Re: Magit, the magical Git interface (2017)

#76
post #9

Magit is an exceptionally well made interface to Git. Yes, it’s built on top of Emacs, and that might stop many from even looking into it. - I am glad I made a deep dive into Emacs last year, and although I stopped using it as an IDE (VS Code is just too good), I still come back to it because of Magit (and macros, general text editing and org-mode). Yes, I have an interface for Git in VS Code as well, but it‘s very r…

Spacemacs.org brings the vi modal editing configuration to bear and is highly recommended.

If you just want that you don't need spacemacs, just evil mode.

Re: Magit, the magical Git interface (2017)

#77

For the sake of discussion, can we get some contrarian views? I'm using magit, along with tig, plain git and sometimes (!) even plain "vc", depending on context. I'm in the camp that thinks it's ok and it's pretty comfortable to use within emacs, but I don't see the earth shattering praise I see every time it's mentioned here. Tig for example is so much faster for history and blame perusal that I find it faster to ke…

I use emacs and git, and never got on with magit. Not entirely sure why, but here's a braindump: - I generally dislike layers on layers; while I seriously hate the git UI, I'd rather learn that, as it's a more portable skill, than learn another UI, that relies on emacs and a package installed. First thing I do on e.g. a new cloud instance is clone a bunch of stuff, and often work on an under-setup machine for a while…

I'm not a terminal maximalist, but most git actions are easy to perform from the terminal. Switching to a terminal and typing the right git command has little overhead, and it's a universal way of doing things.

Re: Magit, the magical Git interface (2017)

#78
post #65
post #40

This post is the epitome of "tell, don't show", when it should be the opposite. It reads like it wants to convince you to try magit, without demoing a single example of how it's superior.

> Commands are invoked, not by typing them out, but by pressing short mnemonic key sequences. It also sounds magical in the worst kind of way.

It's not magical. I forget commands all the time, then all I need to do is type `M-x` (to enter a command, like `Ctrl+P` in VSCode I think) and enter `magit ...` where I get auto-complete (if I do it often, I try to remember the keyboard shortcut, but that's optional).

Also, while in magit, you can type `?` to see the list of available commands from the location where you're pointing at... the commands are single-letters, so you normally do `?`, find the description you want, type `p` (push I think!?) or `c` (commit) or whatever... it's really easy and convenient.

Re: Magit, the magical Git interface (2017)

#79
post #69

For the sake of discussion, can we get some contrarian views? I'm using magit, along with tig, plain git and sometimes (!) even plain "vc", depending on context. I'm in the camp that thinks it's ok and it's pretty comfortable to use within emacs, but I don't see the earth shattering praise I see every time it's mentioned here. Tig for example is so much faster for history and blame perusal that I find it faster to ke…

Ok, let me try. I prefer IntelliJ's git interface. Magit can do everything IJ can, but in IJ, I can find how to do things more easily and it just feels easier to do things, probably because it's much more GUI than text compared to Magit. For example, difficult merges are extremely easy in IntelliJ, I can edit code in the diff view itself while I resolve conflicts... in Magit it requires getting used to the different…

Being able to edit the diff directly in the status buffer would be a great additional feature in magit!

Re: Magit, the magical Git interface (2017)

#80
post #22
post #16

Earlier quoted context omitted.

I recently tried out spacemacs and doom on too different new computers but I just couldn’t make them work for me. Maybe if I was coming to emacs from VIM they’d make more sense. I’d recommend that if you want to do emacs from scratch it’s probably easier to just start Witt vanilla and build up your own config. The hardest part is the muscle memory but you’re going to have that with spacemacs/doom too and then you’ve…

I came from VIM as well - Doom Emacs (which is just a cleaner version of Spacemacs) is learnable within a few days. Default config is almost 'good enough' for most, that's kind of the point. Disagreed with "start with Vanilla Emacs and build your own config" though, if you just want to get started quick. Hell no, you'd be discouraged within the first 5 minutes and spend all of your time searching which ctrl-alt-meta-…

> I came from VIM ... is learnable within a few days.

That was my point when I said

> if I was coming to emacs from VIM ... if you want to do emacs from scratch it’s probably easier

There is no quick start with any of these environments .. and even then it takes some detailed technical knowledge to get them up and running. They do sure look pretty! Although I found some of the default theming a little hard on the eyes for prolonged work.

> Default config is almost 'good enough'

The problem I had, was that to go beyond that it's a little trickier than what I'm used to, and there really isn't the same degree of support as what you get with more orthodox approaches. Though the community small is it is around these distributions are enthusiastic, helpful and friendly.

Like I say, the whole muscle memory thing feels quite alien at first, it soon becomes quite delightful, but not a lot more difficult to learn I think than VIM. I do like VIM, and there's many occasions where I'll use that for a quick command line based edit, and perhaps at some stage I will learn the VIM keybindings properly to the point where EVIL mode makes more sense.

I wouldn't gripe too much about the complexity of emacs, since that's where a lot of it's power lies (even if I never fully use it myself), but I wouldn't be in the habit of just copying/pasting random elisp. Usually if you've to go that much trouble it's not worth it, as somebody would have made it easier already.

Post reply on HN