Live data from Hacker News

Magit, the magical Git interface (2017)

emacsair.me

21–30 of 357 posts

Re: Magit, the magical Git interface (2017)

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

You should check out edamagit, magit for vscode! https://github.com/kahole/edamagit

Re: Magit, the magical Git interface (2017)

#22
post #16
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.

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-whatever to press to do trivial things, or copying/pasting obscure elisp snippets that you don't fully understand from stackoverflow.

Re: Magit, the magical Git interface (2017)

#24
post #20

I've been using tig for things like this. Are they related somehow? Tig is amazing :)

Also recommend lazygit. I use it everyday and it's pretty awesome.

For the lazy: it is on github. https://github.com/jesseduffield/lazygit#readme

Re: Magit, the magical Git interface (2017)

#25

I've been using tig for things like this. Are they related somehow? Tig is amazing :)

Magit's more feature-rich and has better discoverability than tig, from what I can tell.

e.g. with tig, you invoke "!git commit" by pressing C from the status page.

With magit, from the status page, commit is performed by pressing cc. But, if you press only 'c', a context menu is brought up which shows the flags which can be set, and commands which can be run.

e.g. 'cc' is 'commit', but 'ca' is 'amend'.

e.g. An example of a flag might be "--force-with-lease". So, press 'P' opens the push context menu, '-f' enables the "--force-with-lease" flag, 'p' pushes to the remote. (Or just 'P-fp' quickly works, too).

tig looks like 80% of the benefits (much nicer to use than git) for 20% of the effort (not having to learn Emacs).

Re: Magit, the magical Git interface (2017)

#27
post #26

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

neogit is "magit for neovim". It is written in Lua. Did you already know the answer to your question? ;)

https://github.com/TimUntersberger/neogit

Similar Git tooling can be found in https://github.com/frontaid/git-cli-tools

Re: Magit, the magical Git interface (2017)

#28
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.

Re: Magit, the magical Git interface (2017)

#30
post #6

If it's so great why are people not building it out of emacs :P

Part of its greatness comes from the fact that it's in emacs. Although it might look like a GUI/TUI, magit's interface is all normal emacs buffers with all the normal navigation, selection and editing (where appropriate) features available. That's huge, but difficult to explain why if you don't use emacs.

It's frustrating for me because I believe magit is the best git interface there is. Using it increases your understanding of git and decreases your chances of error. I'd really like the rest of my team to use it instead of the CLI. But when I think about it outside of emacs, it just doesn't work.

Post reply on HN