Live data from Hacker News

Magit, the magical Git interface (2017)

emacsair.me

271–280 of 357 posts

Re: Magit, the magical Git interface (2017)

#271

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

I picked up Sublime Text + Merge a few months ago (I wanted Sublime Text and figured I'd try out Merge since the bundle was cheaper), and it turns out I use Sublime Merge way more. (Sublime Text is fine but for my workflow it has a bunch of gaps with Visual Studio that I haven't been able to fill).

Sublime Merge and vscode + git plugins are pretty close to each other but Sublime Merge does everything I need with less fuss. vscode just has some rough edges due to it's swiss-army knife approach that Sublime Merge doesn't.

Re: Magit, the magical Git interface (2017)

#273
post #43

Magit is such an unbelievably good piece of software. If you haven't used it, please at least take a look. It seems like "just a GUI for git", but that's missing the point — many operations suddenly become frictionless, so your entire workflow changes. I regularly do things like "stash some of my changes, switch branch, cherry pick a commit, switch branch, do an interactive rebase reordering commits and dropping one,…

> 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 like having both. I use fugitive in vim which is great for partial staging, blaming, and committing (and status). Almost everything else I do on the command line. I will also commit from the command if I already happen to be there. The one thing fugitive is indispensable for is looking at a file on a different branch right in the editor.

Re: Magit, the magical Git interface (2017)

#274

Earlier quoted context omitted.

That's by design; Git history is intended to be immutable when working with others. But, if you haven't pushed something up to a remote, the right command to make more changes is to use `git commit --amend`.

> Git history is intended to be immutable when working with others. That's another pet peeve (though maybe less git's fault): immutable, yes, but then rebase is pushed quite liberally. Arguably not by git itself, but by many online learning resources. It's convenient, and mostly works, but then occasionally really stings you. ...yet undoing the last commit, arguably the least aggressive of history-rewriting commands,…

It's also very wise to make sure you disallow force pushing to master/main/production. If you force push to a topic branch, it's usually ok. If you accidentally overwrite someone's changes, it's because you are working together and you can communicate that you messed up and for them to `pull --rebase` or however you want to resolve it. Usually that is. There's always room for disaster :)

Re: Magit, the magical Git interface (2017)

#275

Earlier quoted context omitted.

It does not really seem to be maintained anymore. Is there any downside because of that?

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.

Re: Magit, the magical Git interface (2017)

#276
post #234

Earlier quoted context omitted.

What I dislike with git terminal UI is that commands reflect the innards of git, not what the user wants to do. It also forces a deeper understanding of the innards for basic commands than ought to be necessary. Examples where undoing an operation looks totally different to doing it: - To stage a change you `add` it, to unstage you `reset HEAD` - To commit you `commit`, to undo a commit you `reset --hard HEAD^` The l…

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

If it was that easy, https://blog.waleedkhan.name/git-undo/ wouldn't be a thing.

Re: Magit, the magical Git interface (2017)

#277

Earlier quoted context omitted.

Well, I physically cannot take the keystroke geometry if stock emacs for any stretch of time; the space bar approach is crucial for me.

Evil mode supports leader keys. It’s pretty trivial to setup.

The real value of Spacemacs is which-key and having everything already configured with semantic leader key setups. Like you can absolutely do that yourself but at that point you're implementing Spacemacs.

Re: Magit, the magical Git interface (2017)

#278

I'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…

> So I wonder what marketing techniques they use to make people feel this way; the emotions are strong, and widely shared. It's easy. 1) Listen to the fans when they suggest a feature even if it doesn't click when first hearing about it, but then approve upon the initial suggestion, turning it into something I myself would want to use too. 2) Ignore the haters except for telling them how to disable that one feature t…

Let me rephrase that: Give those that already love your project more of the same instead of wasting time on making those who think your approach is fundamentally misguided slightly less dissatisfied.

Re: Magit, the magical Git interface (2017)

#279
I feel like I'm missing out on a lot by not knowing emacs.

I tried to learn emacs once, and the tutorial started with "I've been using emacs for about 25+ years and I'd say I'm about a middle of the road user"... that was when I was like, "No, I'll just keep using IntelliJ or vscode or whatever".

It's not that I love or even care about any IDE, I just literally haven't the first clue as to even get started with emacs. So what should I do if I want to give it a second chance?

Re: Magit, the magical Git interface (2017)

#280

Earlier quoted context omitted.

I've been using git for ~8 years and I've never heard of --soft

The default for `git reset`, which is `--mixed`, may do what you want. The difference between `--mixed` and `--soft` is that the former resets the index as well as moving the HEAD pointer; the latter only moves the HEAD, so if you’ve `git add`ed any changes, they will remain staged.

Wow this is a new level of Git hell I haven’t even heard about!
Post reply on HN