Live data from Hacker News

Magit, the magical Git interface (2017)

emacsair.me

321–330 of 357 posts

Re: Magit, the magical Git interface (2017)

#321

Earlier quoted context omitted.

Looks to me like it had commits in June and August of this year. Or do you wonder whether they'll add features like pushing from within vimagit?

I did see the commits, but the last release was almost three years ago. That is not necessarily bad. I was just wondering whether it still works well or there are any quirks.

Many Vim plugins abandoned the release model since most Vim and NeoVim package managers focus on fetching latest git HEAD for every installed plugin.

Re: Magit, the magical Git interface (2017)

#322
post #234

Earlier quoted context omitted.

> If you mistype it and nuke more than the last commit, that's also a bit bad - and fairly easily done. If you ever run into this, you can use `git reflog` to see the history of your local actions. It's possible to revert almost any action with it. Reset a few commits that you've never pushed to remote? No worries! Just go to `git reflog`, find a point before it happened, and `git reset` to it. $ git reset --hard HEA…

Yes, except... again, this is fighting fire with fire. If you don’t know git internals, mistype a non-obvious command and lose a bunch of commits, then “look in the reflog” advice is frankly adding insult to injury.

The age old adage applies here: know your tools.

Re: Magit, the magical Git interface (2017)

#323
post #231

Earlier quoted context omitted.

Some tools inspire reactions like this. Nix and NixOS also fall in this camp. The small number of people who love them write blog posts and comments evangelizing them. The much larger number of people who find no use for these tools, or who tried them and do not like them, do not find it worth the energy to write something about why they did not like the tool or why they just never bother to try it. Even if they did…

Is there a name for this type of bias?

It might be a case of survivorship bias: https://en.m.wikipedia.org/wiki/Survivorship_bias .

Re: Magit, the magical Git interface (2017)

#325

Earlier 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.

You can always:

[alias]

undo = reset HEAD~1 --mixed

Re: Magit, the magical Git interface (2017)

#326
post #135

Earlier 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…

I gained a better understanding of git through this document: https://eagain.net/articles/git-for-computer-scientists/ I'm not a computer scientist and I think it's understandable. Everything became a lot more clear in my mind once I understood the inner workings.

This free book[1] is authoritative and explains Git very well IMHO.

https://git-scm.com/book/en/v2

Re: Magit, the magical Git interface (2017)

#327

Earlier quoted context omitted.

Yes, except... again, this is fighting fire with fire. If you don’t know git internals, mistype a non-obvious command and lose a bunch of commits, then “look in the reflog” advice is frankly adding insult to injury.

The age old adage applies here: know your tools.

And he knows it well enough to prefer a different tool.

What's right for one isn't right for all.

Re: Magit, the magical Git interface (2017)

#328

Earlier quoted context omitted.

> stash some of my changes, switch branch, cherry pick a commit, switch branch, do an interactive rebase reordering commits and dropping one, pop one of my stashes > working with code becomes a fluent experience, rather than fighting with your tools I also do this regularly, but on my terminal. I don't feel like I'm fighting the git tools. Is this a common experience? I enjoy using git GUIs as well, especially for vi…

> I also do this regularly, but on my terminal. I don't feel like I'm fighting the git tools. Is this a common experience? My big hang-up with interactive rebases is that I do them just infrequently enough that what exactly a set of choices will yield—what's going in the commit message, et c.—is something I have to sit there and reason about for a really long (by the standards of something that really is not that com…

Interactive rebases are my favorite git feature. I get to pick, drop, reorder, reword, fixup, squash, split and of course rebase commits. Pretty much everything I need to create a nice history before pushing.

Re: Magit, the magical Git interface (2017)

#329
post #290

Earlier quoted context omitted.

> stash some of my changes, switch branch, cherry pick a commit, switch branch, do an interactive rebase reordering commits and dropping one, pop one of my stashes > working with code becomes a fluent experience, rather than fighting with your tools I also do this regularly, but on my terminal. I don't feel like I'm fighting the git tools. Is this a common experience? I enjoy using git GUIs as well, especially for vi…

I was like you for a really long time. Then, I watched someone do stuff in Magit that took longer or I struggled with to get perfect in the terminal. Took a few weeks to get comfortable, but once I did, it was really nice.

I'd just like to say I'm not opposed to the GUIs at all. I use gitk and sublime merge a lot. They are really nice too.

Re: Magit, the magical Git interface (2017)

#330

Earlier quoted context omitted.

> stash some of my changes, switch branch, cherry pick a commit, switch branch, do an interactive rebase reordering commits and dropping one, pop one of my stashes > working with code becomes a fluent experience, rather than fighting with your tools I also do this regularly, but on my terminal. I don't feel like I'm fighting the git tools. Is this a common experience? I enjoy using git GUIs as well, especially for vi…

If you know git cli very well, most of the stuff are straight forward. Most people struggle with git if they have not spent the time to understand how it works. But there is one thing I believe is still not-very-smooth in the git cli: splitting hunks. if I do interactive add in git, and I get small hunk that adds a line, deletes a line, adds another line, and deletes a line, then if I want to include only the additio…

Agree. I always use either gitk or sublime merge for dealing with hunks. Diffs too.
Post reply on HN