Staging those changes and commiting them right away if there are more working on the code base or simply staging them as a separate commits when the current task done makes it so much easier to keep a clean history - without having to do intermediary commits or stashing.
The feature is called git add --patch[0] in command line git but magit makes it so much more accessible.
Doing so is also easy using command-line git (add -p, commit -p and hunkwise reverts with checkout -p), the great thing about magit is it lets me do so:
1. with a bird's eye view, git's <x> -p shows hunks independent from one another and asks me what I want to do, sometimes I have no idea because I don't really remember what the context of that change is (or if there is one)
2. nonlinearly, similarly to above git's <x> -p goes through each hunk one by one, in magit I can go back and forth in the diff buffer if I need more info, there are shortcuts to process it linearly but it's a help (because that's a common case) not a limitation of the tool
Really is nothing quite like the trio of the tools.
and actually, I recently fell in love with dired, I literally use it all the time. I like it better than finder or the command line !!
Magit is just so easy to use for discarding hunks / rebasing / etc. Quick, visually clear. I sometimes use emacs just to use magit when working with java on a fiddly git task even when I'm working in intellij to modify the actual code.
> Make Magit more accessible to non-Emacs users
> I think that Magit can be an excellent Git interface for users of other editors and IDEs. It would be a shame if its user-base continued to be limited to people who use Emacs for editing purposes.
> To appeal to non-Emacs users, Magit has to be made more accessible. Additionally I intend to provide simplified Emacs configurations and documentation that teaches just enough Emacs to be able to use Magit. See Magit for users of other editors for more information.
[1]: https://www.kickstarter.com/projects/1681258897/its-magit-th...
The rebase and interactive stage/unstage are especially stellar.
It does get a tad slow on huge repositories, but that's the case of most git clients.
Despite using pycharm for $dayjob, most of my interactions with git are through magit. Basically the only ones which are not are annotations-browsing (IDE integration is too convenient there) and branch-switching ($dayjob repo being huge, switching major branches can take some time and magit completely locks up emacs + has no feedback, so CLI is more convenient)
Even if better Operating Systems exists, there are no better Deskop Environments ;-)
I used to use Emacs (Spacemacs) as my main IDE - I have since switched to PyCharm/CLion but I still use Spacemacs+Magit as a sort of a standalone git client because nothing else gets close.
Oh, plus, it works beautifully over SSH/X11 in case you need to do any git stuff on a remote box and want a "UI". (terminal version is always there too, of course)