4 ms·
I like ve magit, but I often enough find that I end up in a sticky situation that I can't resolve without retreating back to the CLI. I don't know if that's a d
by Y_Y 4y ago
I like ve magit, but I often enough find that I end up in a sticky situation that I can't resolve without retreating back to the CLI. I don't know if that's a deficiency in magit or just a matter of me not knowing well enough how to use it. Typically I just call the magit equivalent of whatever git base command I want and helm gets me the rest of the way with setting parameters.
- BaculumMeumEst 4y agoit mostly works super well for me, but sometimes while i’m using magit i manage to get emacs stuck in a weird state where i cant close the minibuffer or enter any commands. mashing c-g or esc in each open split doesnt help, and i end up having to force close. probably not magit’s fault, and it happens rarely, but it’s one of several problems i cant escape from that give me a sense of dread every time i open emacs. mostly switched away from emacs as a result
- yuuuzzzzzz 4y agoEnacs shouldn't freeze like that tbh, I've been using Emacs + Magit for a while now and it doesn't freeze ever.
- School-Cotton 4y agoThe exact described behavior has happened to me as well.
- precompute 4y agoC-x 0 is the way out. That happens sometimes when focus shifts while the Transient hasn't properly exited.
- BaculumMeumEst 4y agoahhh that sounds like it would work, thanks
- tarsius 4y agoThat's an issue with Transient, a dependency of Magit and also authored by me. It's complicated, but essentially the problem is that post-command-hook is not guaranteed to be run after the command. And the second problem is that I tried working around that for too long (and instead resorted to increasingly sophisticated and desperate heuristics), instead of getting it changed in Emacs. I've done that now, so maybe in Emacs 30. But I have also switched to handling part of it using an around advice, which does work reliably. I've done that about two weeks ago, so changes are that if you update Transient now, you won't ever see that again.
- andreareina 4y agoWhat kind of stuff are you doing that gets you in a sticky situation, and how are you getting out of it? IME I've generally been able to do most complex things I need with some combination of the stash, rebase, cherry pick/apply and if I've stuffed things up the reflog, all done from within magit.
- throwanem 4y agoSame. About the only thing I durably haven't figured out how to do with it is move a branch tag.
- andreareina 4y agoBranch or tag? branch: b x tag: t -f t Tags aren't meant to be "moved", that's why you need to --force it.
- agumonkey 4y agoCurious about that, I think I can count these events on one finger a year (and maybe the absence of direct `git push --tags --force`). For me it's some strange state where creating a branch from a remote doesn't linked the two. That's about it. Usually : - reset - rebase - fetch / pull / push - cherry pick - stash and then magit-blame, git-timemachine etc.. all work smoothly But we all have our own usage, what did you try that made magit get stuck ?
- spit2wind 4y agoThis happens with me, too, sometimes. Are you aware of how to execute git cli commands through Magit? (From memory, it's exclamation, !) As for whether it's Magit or you, I suspect it's git. Git is complicated.
- iib 4y agoThere is also the documented way of running git commands straight from magit [1]. I am leaving this here, in case it may help you with those times that you have to go to the command-line. [1] https://magit.vc/manual/magit/Running-Git-Manually.html https://magit.vc/manual/magit/Running-Git-Manually.html
- TacticalCoder 4y agoAh that's intriguing, I'm using Magit since forever and had no idea! When I need to do it I like to do it from a regular prompt: I just switch to an actual terminal (i.e. not from Emacs: not an eshell, not an libvterm, not anything like that: just the "real thing"). Then I just hit 'g' (which runs magit-refresh) when I go back to Emacs.
- ParetoOptimal 4y ago> When I need to do it I like to do it from a regular prompt: I just switch to an actual terminal You might like exploring using async-shell-command for these things. If you like that, you may also like detached.el for command rerunning and command output history.
- lordgrenville 4y agoI often get stuck with Magit and have to resort to the CLI to fix things. But what I find is that using the CLI, I only have a vague idea of what I did, whereas if I take the time to understand how to do it with Magit functions, I end up with a clear understanding of what's happened.
- SirensOfTitan 4y agoI find myself in the opposite situation: I've used magit for so long I don't quite remember how to do things in the CLI. Magit is such muscle memory for me at this point that my git experience has largely become subconscious.