Live data from Hacker News

Magit 3.0

emacsair.me

91–100 of 144 posts

Re: Magit 3.0

#91
post #4

I heard lots of praise to Magit. Is there a way to use it like a standalone git client? Like tig, lazygit, etc.

You could just alias this in your shell: alias magit='emacs -nw --eval "(magit-status)"'

I was reading the thread and replied to a very similar situation. The only addition was that if you want only a magit interface, it makes no sense to load the rest of your emacs config, so you could add a special magit initialization file, and just add -Q --load magit-init.el

Re: Magit 3.0

#92

Magit must be one of the best software tools ever written. I sorely missed it when I had to use IntelliJ for a few projects, so I wrote a TUI tool like Magit that can be used inside the console window of most IDEs like IntelliJ etc. Still haven't gotten around to releasing it properly, but it's easy to setup and works well enough to be a working MVP. https://github.com/hugit-project/hugit

I usually always have Emacs up and even if I'm in vscode or intellij I use magit in Emacs for all got things.

Re: Magit 3.0

#93
post #73
post #64

Earlier quoted context omitted.

There's definitely some aspects of it which I struggle with. Like cherry picking a commit always feels somewhat painful, and I can never remember offhand the exact menus and keys to press to do it. But for day to day development, it's fast and great. I love having the separation between the push branch and merge branches for example, which feels very natural in a PR workflow. And the forge integration is brilliant.

Cherry-picking is amazing with magit. I use spacemacs so my magit has evil style keybindings. I just open up a log view to the branch i'm cherry-picking from, move the cursor to the commit I want to pick, then if I don't remember what the key is I just press ? and it shows me all the commands, then I press A for cherry-picking, and it immediately populates it with the commit that my cursor is on in the log view. Easy…

I think it's having to go into a log view that bugs me. I just want to press one button for cherry pick, point it to a ref and be done. It might be possible but I haven't figured out how yet.

Re: Magit 3.0

#94
post #6

Emacs is too laggy for me as my main editor. But Magit is so good that I start emacs up just to use it as my Git interface if I can't get by just with the CLI. Sadly there is no Vim plugin that is competitive. There is vimagit [1], but it's not on par. [1] https://github.com/jreybert/vimagit

I'm really happy with fugitive[1] for vim. Can anyone compare those two well enough, so that I understand what I am missing?

[1]: https://github.com/tpope/vim-fugitive

Re: Magit 3.0

#95

Earlier quoted context omitted.

Cherry pick is faster and easier for me in the CLI. I’ve read Magit’s documentation on Cherry pick dozens of times and I still have no idea what it’s doing. I think I have successfully done it in magit once, but now I don’t bother and just do it on the command line. For everything else I absolutely love magit. The ability to stage and commit chunks in a visual fashion is an unbeatable killer feature!

I do cherry picks in magit by: 1. Check out target branch 2. l o (log other) source branch 3. Highlight commits from list you want to cherry pick. 4. A A to apply the pick (I typically throw a -x flag into there too)

Thank you! That workflow makes sense. We’ll see if I remember that next time I Cherry-pick.

Re: Magit 3.0

#96

Looking forward to using the new release. "git at the speed of thought" describes magit quite well. Actually sometimes magit nudged me into the direction of looking up some more special git commands, to learn about them and then making use of magit's interface to them, often simply pressing one button more. Magit has not made me forget how command line git works, because it often shows me right there, what the argume…

Nice. I think the same about the GUI gitExtensions.

I'll give it a try

Re: Magit 3.0

#97

Earlier quoted context omitted.

I upvoted you but... How comes Emacs is laggy for you? I'm running a beefy Emacs setup and it is really responsive. If anything Emacs in the nineties was "Eight Megabytes And Constantly Swapping" but... We're in 2021 now and now it's still 8 MB, so it's a rounding error (I'm only exaggerating a bit). It's one my lightest app: starting Emacs, eval'ing some elisp, and exiting takes... 81 ms. Eighty-one milliseconds. To…

Emacs is still (AFAIK) entirely single-threaded. If you are performing some operation that blocks (e.g. a network call, a shell command such as "git clone") all other windows are blocked until that completes. I would guess if you have something like FlyMake configured for on-the-fly syntax checking, you could also get a "laggy" feeling. Just launching and using a vanilla emacs session feels quite snappy in my experie…

you don't need multiple threads to run things concurrently (such as network I/O, communicating with subprocesses) e.g., I believe url-retrieve in emacs doesn't stop the world (because there is -synchroniously version too). async is a thing

Re: Magit 3.0

#98

Earlier quoted context omitted.

I upvoted you but... How comes Emacs is laggy for you? I'm running a beefy Emacs setup and it is really responsive. If anything Emacs in the nineties was "Eight Megabytes And Constantly Swapping" but... We're in 2021 now and now it's still 8 MB, so it's a rounding error (I'm only exaggerating a bit). It's one my lightest app: starting Emacs, eval'ing some elisp, and exiting takes... 81 ms. Eighty-one milliseconds. To…

I was a longtime Emacs user (and vim before that) and recently a project I was working on was far too laggy for me to actually work productively on in Emacs. It was largely due to me using various LSPs within Emacs -- the frontend was in TypeScript and the backend in Go, and inevitably things would grind to a halt on a 5 year old i7 MBP with 16GB of RAM. Switched over to VSCode with as many extensions as I could find…

I have the exact same story. Multiple LSPs in emacs was too hard to manage and seeing as some of it was typescript, much worse than the VSCode experience. Edamagit has made a very good start at emulating magit in VSCode. Still use emacs for magit though.

Re: Magit 3.0

#99
post #45

Earlier quoted context omitted.

I know that these "works for me" discussion are often not fruitful. But, I'll ask this: have you done a several hour session of typing/programming into a JetBrains IDE? I'm claiming that on my work Macbook Pro, even just typing plain text into a file and scrolling lines in IDEA is smoother and more responsive than doing the same in Emacs. I use the Vim plugin for IDEA and evil mode in Emacs. Even things like holding…

Something is definitely wrong with your configuration (in a wide sense, not necessarily restricted to just the editor). Emacs is at least an order of magnitude more responsive than IDEA (or any other JetBrains IDE). Start with a stock Emacs, no extra third party packages loaded, to get a sense of performance. There is a lot of great Emacs Lisp code out there, but the opposite is also true: Horrible code written by fo…

Personally, I find that normally emacs latency is more than tolerable. But LSP is pretty bad, at least with clang-lsp, especially on a fairly loaded machine. I have yet to try the jit branch though.

Re: Magit 3.0

#100
post #86

Magit must be one of the best software tools ever written. I sorely missed it when I had to use IntelliJ for a few projects, so I wrote a TUI tool like Magit that can be used inside the console window of most IDEs like IntelliJ etc. Still haven't gotten around to releasing it properly, but it's easy to setup and works well enough to be a working MVP. https://github.com/hugit-project/hugit

Would the need for a pure terminal magit be resolved by the fact that Emacs can run in the terminal? [1] seems to have a solution to obtain a fast starting subset of Emacs and start into magit-status directly. emacs -Q -nw --load magit-init.el --eval '(progn (magit-status) (delete-other-windows)' Would this work in IDE consoles? [1] https://www.wisdomandwonder.com/article/10787/emacsorg-mode-...

[deleted]
Post reply on HN