Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
The killer feature for me on IntelliJ Idea Git is: * that I can reorder the (local) commits * mark with the mouse and right-click to squash them No other git tool I know has these features.
A work-in-progress Magit clone for Neovim
31–40 of 80 posts
Re: A work-in-progress Magit clone for Neovim
#32Earlier quoted context omitted.
For me, Magit's killer feature is that it provides something equivalent to "git add --interactive" but with a much nicer UI. If you're interactively adding things to a commit then you are effectively editing a text file, and that's always going to be easier in a proper text editor than on the command line. Magit can show you all of the hunks that can be staged simultaneously, allowing you to choose, split, edit, and…
I think your argument pretty much boils down to the same as for most GUI vs CLI arguments: parallel vs serial, intuitive vs abstract etc... but it all comes at a cost, less flexibility, less power, more complexity, less combinability (less unixy). Just saying, the argument is the same as for any other GUI version of a particular CLI tool, and so it's inevitable we end up with an opinionated divide, because it's not o…
Edit: the relevant claim from the docs is
> Magit is an interface to the version control system Git, implemented as an Emacs package. Magit aspires to be a complete Git porcelain. While we cannot (yet) claim that Magit wraps and improves upon each and every Git command, it is complete enough to allow even experienced Git users to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains.
Re: A work-in-progress Magit clone for Neovim
#33Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
Why not just use cli? I definitely champion _knowing_ cli git for when you need it, but at some point the standard workflows become tedious with the amount of typing required, even using shorthand.
magit provides some super accessible and efficient workflows when paired with e.g. doom-emacs or similar mnemonic keybinds.
Other have mentioned the equivalent of git add -p and believe me using vim's visual selection instead of manually editing out that one line of the patch is a breeze.
Re: A work-in-progress Magit clone for Neovim
#34These days, I just use git in a tmux split rather than trying to force vim to show some arbitrary git UI. For a nice interactive git UI, I use tig[1]. Tig is essentially like fugitive/magic insofar as it allows me to interactively view a nice graphical log, stage/commit, traverse a file's historical blame, etc. It's a nicer UI compared to something like `gitk`.
I have these mappings in my `~/.vim/vimrc` for git/tig functionalities:
nnoremap gb :echo system('git rev-parse --abbrev-ref @ tr -d "\n"')
nnoremap gB :silent !tig blame =shellescape(expand("%")) +=expand(line('.')):silent redraw!
nnoremap gO :silent !tig:silent redraw!
[1]: https://github.com/tpope/vim-fugitiveRe: A work-in-progress Magit clone for Neovim
#35As a vim user, I'm using lazygit[1] for handling git operations. What am I missing w.r.t a EMACS+Magit workflow? [1]: https://github.com/jesseduffield/lazygit
I've started using lazygit for simple operations on Windows as magit can be slooooow there. I fall back to magit where needed. Initial impression is that lazygit is much less mature and complete than magit. There's essentially nothing git can do that I can't make it do via magit. Lazygit in comparison is quite limited, often dropping out of the TUI to the command line to perform operations the TUI can't represent or…
You can use a Windows X11 server for the GUI, but I think (?) there is native support for running GUI apps these days.
Re: A work-in-progress Magit clone for Neovim
#36What is « Magit »?? Can’t find any information about it on this GitHub repository.
Re: A work-in-progress Magit clone for Neovim
#37Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
I always tell people to stick to the offical git tools (git CLI, git-gui, gitk). They upper-case Work. They understand git's model, unlike generic VCS frontends. The GUIs are not the best-looking in the world, but very efficient and fast. Lots stick to IDE integrations and don't then don't know how to help themselves if those break, which they frequently do. "I'll just delete my repository and clone again"...
Asides from actually working, which many of the other tools don't really, git's stuff is available everywhere you have git, and also works the same way everywhere.
Re: A work-in-progress Magit clone for Neovim
#38Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
> ... when you can just master the official command line client and forget about the rest? I generally agree, I want the full git interface, which is available everywhere and has no limitations and is not bound to a particular editor. There is however one area I do find useful to have integrated into an editor, various kinds of code annotations... e.g gitgutter, I use this in vim - these type of features compliment g…
Re: A work-in-progress Magit clone for Neovim
#39Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
You mean the git cli often acclaimed for it's poor ergonomics? In any case, Magit is great for two things: easy to use and learn, and interactive features. If you made two separate changes in a single file, you might want to have them on different commits. Doing that on the CLI is tedious at best. Magit makes doing things like that trivial, which results in better commit hygiene.
git cli is confusing, because commands are not orthogonal and flags often change behavior drastically. "git checkout 1.2-dev" checks a branch out, "git checkout src/AceGraph.cpp" checks a file out (i.e. reverts it to checked in state), "git checkout -b feature1234" creates a new branch. These are all ergonomic (easy to use and remember), but also confusing commands (why does git-checkout do three different things depending on arguments?).
Re: A work-in-progress Magit clone for Neovim
#40Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…
> Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? Because it is faster, has great visualization and most importantly magit has great fallbacks. You can still use the command line from magit! Pressing "!!" in a magit-status buffer will get you there, while still showing you all the nic…
Not necessarily tedious - you can just use "git add -p" to stage hunks individually.