Live data from Hacker News

Magit, the magical Git interface (2017)

emacsair.me

31–40 of 357 posts

Re: Magit, the magical Git interface (2017)

#31
post #29
post #26

Is there something like Magit for NeoVim? Preferably in Lua.

I've used vimagit for a long time (it's not in Lua, but it's pretty awesome): https://github.com/jreybert/vimagit

It does not really seem to be maintained anymore. Is there any downside because of that?

Re: Magit, the magical Git interface (2017)

#32
post #12

If GUI is your thing, I recommend giving Sublime Merge a look. I absolutely love it. I've heard that there are similarities to Magit in the terms of capabilities, e.g. staging (or reverting) by line.

That's an example of an "other git interface" as described in the article.

Re: Magit, the magical Git interface (2017)

#33
post #11

Given I've been on/off Spacemacs / Doom for years myself, I would definitely pay for a well-packaged isolated one-click-installable Magit as a separate git client.

is this enough?

alias magit='emacsclient -t -c -e "(progn (magit-status) (delete-other-windows))"'

Re: Magit, the magical Git interface (2017)

#34

Magit is insanely ergonomic. Like how easy is it to selectively stage portions of files in the git CLI? In magit it is usually just a few keystrokes. I wish magit-forge [0] had more features though - like I cannot create new labels from it. Please consider donating [1] to the developer if it has made your life any easier. [0] https://github.com/magit/forge [1] https://magit.vc/donate/

> Like how easy is it to selectively stage portions of files in the git CLI?

git add -p

Then you can decide if each hunk is staged or not.

Re: Magit, the magical Git interface (2017)

#35

Magit is insanely ergonomic. Like how easy is it to selectively stage portions of files in the git CLI? In magit it is usually just a few keystrokes. I wish magit-forge [0] had more features though - like I cannot create new labels from it. Please consider donating [1] to the developer if it has made your life any easier. [0] https://github.com/magit/forge [1] https://magit.vc/donate/

https://jonas.github.io/tig/

Re: Magit, the magical Git interface (2017)

#36
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…

Open the diff, select the lines, right click, "stage selected lines".

Re: Magit, the magical Git interface (2017)

#37
post #36
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…

Open the diff, select the lines, right click, "stage selected lines".

But how do you select lines / changes spread all over the file? Doesn‘t work via Shift or Command click.

Re: Magit, the magical Git interface (2017)

#38
post #5

I started using it recently. It feels more like a git app in emacs, you use it in a separate buffer from your files. The shortcuts are ergonomic (single key presses, no gymnastics with modifier keys) and mnemonics are good: s(tage), c(ommit), p(ush).

Note that magit-blame can be run from a file buffer.

I also like git-timemachine for stepping a file forwards/backwards through commits (that's not part of magit, I just think it's neat)

Re: Magit, the magical Git interface (2017)

#39
post #37
post #36

Earlier quoted context omitted.

Open the diff, select the lines, right click, "stage selected lines".

But how do you select lines / changes spread all over the file? Doesn‘t work via Shift or Command click.

Actually it might require the gitlens extension. It's very well integrated and I've been using it for so long I don't know where one ends and the other begins. Regardless, if you open the diff view, the right hand side is editable and you can make selections like any other view.
Post reply on HN