4 ms·
Why would I use magit over the git CLI? 1. Discoverability. It'll display the contextually relevant options and commands at most points. By using magit, you're
by GlennS 5y ago
Why would I use magit over the git CLI?
1. Discoverability. It'll display the contextually relevant options and commands at most points. By using magit, you're learning the git CLI commands at the same time, including commands that you'd normally never come across without a comprehensive read of the manual or release notes.
2. Fewer keypresses. Also, extra shortcuts for some common operations.
3. The bits that CLIs aren't very good for: staging and unstaging pieces of files, viewing conflicts.
(I do still use the Git CLI a lot of the time too.)
- jwr 5y agoI think (2) is why I use it, it's just much faster. It doesn't let you skip over understanding Git, it just makes you work faster. I also think that the experiences of: * looking into a stash and applying only selected changes from it, * browsing all your changes and staging only some of them, * quickly killing changes that you simply want to drop, e.g. not commit and remove from your edits are much slower when using the command line.
- digikata 5y agoI tend to avoid using stash in that fine grained way because branches are cheap in git, and you get a rich set of operations using a local branch to stack up unorganized code changes. Rely on stash on only very quick setting aside of work then returning to it. If I stash and find it needs to live longer than that - I’ll stuff it into a named branch.
- deleted 5y ago[deleted]
- mplanchard 5y ago1 is really true. Magit is how I learned about workstrees!
- kmarc 5y agoSounds like the same for which I started using (and then eventually abandoned) fugitive. Staging part of files is the only thing I found hard with cli but then fugitive or simply git difftool helps with that too (using vimdiff) For everything else I defined my own git aliases (git graph, git mr, etc)
- PaulDavisThe1st 5y agoRe: 3 ... I find that the CLI ("git add -p") works here when the scale of the changes I've already carried out is fairly small and there are not too many orthogonal changes in the file tree that I want/need to commit separately. If that happens, it's off to magit I go.
- emodendroket 5y agoI'm usually a pro-GUI person but I've always found git GUIs to be confusing/trying to paper over the model in a way that made me not like them. Though I don't mind what IntelliJ has. Maybe I need to give this magit tool a try as well.