3 ms·
How often do you wish you could easily commit parts of what's changed? Or more specifically, how often do you use git add -i or git add -p to stage (and then co
by fragmede 4y ago
How often do you wish you could easily commit parts of what's changed? Or more specifically, how often do you use git add -i or git add -p to stage (and then commit) partial changes? You can argue you've never done that and therefore don't need it, but that's something Magit makes easy and you end up using it quite frequently, if you bother to learn it.
- tra3 4y agoMy whole workflow is based on `git add -p`.. I'm sold, going to give it a go.
- sreevisakh 4y agoJust to add a point here - lazygit (mentioned in the question), gitui etc all allow easy interactive partial staging that you suggest. It's great that these tools gives interactive staging the importance it deserves. I prefer magit because it is well integrated into the editor itself, while mimicking the command line git as closely as possible. Magit allows me to use git from a GUI/TUI without the fear of forgetting the command line tool. Meanwhile, there is another tool that deserves special mention for interactive staging - (neo)vim's fugitive. It treats the working copy and the index as two buffers and opens them in diff mode. You can compare the two versions directly as plain text, instead of as formatted diffs like in case of magit. Staging as simple as using diffput, diffget, etc.