4 ms·
Tooling makes interactive rebasing a bit easier. Magit in Emacs makes it simple and it's just part of my normal flow now. The other thing you can do is do git a
by _asummers 9y ago
Tooling makes interactive rebasing a bit easier. Magit in Emacs makes it simple and it's just part of my normal flow now. The other thing you can do is do git add -p. In CLI, that menu sucks, but in emacs you can simply stage and unstage hunks or even individual lines from the diff with a few keys. Using those has made committing small chunks much smoother of an experience for me.
- adrianN 9y agoThe built-in git GUI also makes that very easy.
- _asummers 9y agoHaving it in my editor is an important property for me, but that's good to hear! Getting more people comfortable with that is good for git and histories everywhere.
- Myrmornis 9y agoWhat magit offers over the CLI, in the area of reworking commits, is actually rather spectacular. It's more than interactive rebase -- it's e.g. the ability to selectively stage individual lines (or hunks or files) and chooose which commit to apply them to as a fix up. It's definitely worth trying as a non-emacs user; if you're interested I can post instructions for starting a one-off emacs instance for magit and nothing else.
- _asummers 9y agoPlus the ergonomics and mnemonics of the keys is really nice. You bring up a menu with a keypress, and then the most common command in that menu is typically just a second press of that key. E.g. c brings up commit menu and pressing c again to bring up the commit message writer, or c a for commit amend, etc. For branches, b b switches branches, l l for logs, r r for rebase continue, p p for push upstream, things like that. Then at any commit sha or file, you can move your point to it and hit enter to view that thing. Or just hit tab to see the diff. It's quite nice.