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
Magit, the magical Git interface (2017)
161–170 of 357 posts
Re: Magit, the magical Git interface (2017)
#162Earlier quoted context omitted.
I am the same. After the pandemic started and I had to witness over screen share how colleagues "use" (fight) git with all sorts of GUI tools, I had to realize that no GUI can be good enough while one doesn't understand git, or, even worse, it can be contraproductive, because people using these GUIs _think_ they understand, but they don't. I even ended up creating a (tailored) 2x90min git course... All that said, I h…
Why would I use magit over the git CLI? 1. Discoverability. It'll display the contextually relevant options and commands at most points. By using magit, you're learning the git CLI commands at the same time, including commands that you'd normally never come across without a comprehensive read of the manual or release notes. 2. Fewer keypresses. Also, extra shortcuts for some common operations. 3. The bits that CLIs a…
I also think that the experiences of:
* looking into a stash and applying only selected changes from it, * browsing all your changes and staging only some of them, * quickly killing changes that you simply want to drop, e.g. not commit and remove from your edits
are much slower when using the command line.
Re: Magit, the magical Git interface (2017)
#163Magit 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)
#164I've never seen the upside. I use Emacs as my primary editor, and I regret it every time I say "today is the day I start using Magit". It is exceedingly invasive, triggering itself even when you don't ask for it (like running "git rebase -i" on the command line). The invasive stuff changes how the text editing itself works, but doesn't add deep features. In the interactive rebase case, I lose the ability to treat the…
Many many people use git as cvs and are confused once it goes past “commit and push”.
I know I don't really know what to do if someone pushed to master whilst I was working and it complains. Usually I just make a new checkout and merge in by hand.
Re: Magit, the magical Git interface (2017)
#165Earlier quoted context omitted.
could you use magit without knowing emacs? I guess you could ... but I can imagine people getting frustrated when the windows keybindings they're used to don't bring forth the expected behaviour. CUA mode exists. Would that be enough? Is magit good enough to actually force people to learn that little bit of Emacs?
I dunno, as I am an emacs user, but I have a similar binding for using calc through emacs client.
Re: Magit, the magical Git interface (2017)
#166Earlier quoted context omitted.
“ - To commit you `commit`, to undo a commit you `reset --hard HEAD^` The last example is also where you get pointed to an unsafe command” Who pointed you there? If I want to undo my last commit, meaning the commit itself, not the changes to my file tree, shouldn’t I say `reset --soft`?
My bad, misgoogled. But this in fact reinforces my overall point. I don't want to be messing with `reset`, hard or soft. What is `reset`? [I now know because I had to learn, but I'd really rather not]. What I want is `uncommit`, or something like that.
On the plus side, Git’s man pages are (sometimes) useful and pretty complete. In this case, if you type `man git-commit` you’ll get a thorough rundown of all the options and it will be clear which one you should use to get what you want.
EDIT: Also, since there are three arenas to keep track of, the file tree, the index, and the commit history, even if there were an `uncommit` command it would need all the flags that `reset` accepts. So it would just be `reset` renamed, which you can do yourself. But maybe some of the `reset` options should be broken out into separate commands.
Re: Magit, the magical Git interface (2017)
#167Earlier quoted context omitted.
IntelliJ GIT ui/ux is so completely frictionless it's magical at times. The only downside is that it makes incredibly complex operations trivial that I never learned git from the cli beyond the very basics.
Really? I tried it yesterday from within Rider and I gave up on it because I couldn't even figure out how to push or pull. Best I could find was fetch. Not the biggest deal since neither of those commands require interacting with the output which makes them equally easy to run from the terminal, but it's strange that they're not available in an immediately obvious place.
In the lower right, there's the vcs "where you're at" that shows the current branch. From there you can see the status of your branch compared to others (if you need to fetch them), or you can update branches (even those you're not currently on) along with branch specific operations including push. You can access the same in the git panel with right clicking on branches in the log.
At any time, you can double tap shift to bring up the "search everything" window. Within that, if you type "git push", it will display that action along with the menu that action is in and any key shortcuts that are bound to it.
Re: Magit, the magical Git interface (2017)
#168Earlier quoted context omitted.
> Switching cost is low, but typing cost is much greater. That typing cost is why I use a GUI. While many times I can just enter `git add -u` into the terminal, there's still plenty of times where I want to be selective about what goes into the commit. If a simple glob pattern can't do it, then I'm going to reach for the GUI where I can just click on all the things I want to add to the commit in far less time than it…
Yup. But then, clicking time (or rather, navigating your mouse) is also slow. Where Magit shines is in being a GUI (a TUI), so you're always informed on the state of the repo, but it's also fully keyboard operated, so you don't have to click on things. The popup-based paradigm for keyboard operation helps with discoverability - first few times around, you'll be going slow to learn what key does what, but after that,…
The key point I was trying to make is that an interface that minimizes the amount you need to type out and that gives you instant feedback to your actions is a superior experience for working with Git in many cases. I say this as someone who uses Git from the command line a ton (to the point where I've added some custom command scripts) but then when I need to do anything complex or browse the logs and diffs I'll enter `gitex` to bring up the Git Extensions GUI.
Re: Magit, the magical Git interface (2017)
#169Re: Magit, the magical Git interface (2017)
#170For 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…