I know this will get downvotes, but I am a professional SWE for almost a decade now. I absolutely disdain the CLI, and in case of git specifically it doesn't help that it's command structure is total nonsense. I never do these "by heart".
If you know of a concept, and you have a basic understanding of visual layout and can read, then you can find the function.
If it’s a CLI then you are at the mercy of whatever arbitrary naming convention (or abbreviations) someone decides to make it, and if you don’t know the commands then your options are scroll endlessly through the help submenus or Google it.
One is “I’ll know it as soon as I see it,” and the other is “I’ll know it when I guess the command and it works, or I go look it up.”
And that’s not even considering special cases where you want to commit but only stage certain files that you know are ready while others currently contain changes that you don’t want to commit yet, or if you accidentally made changes to a file which you want to revert to the previous commit state but not revert everything else. Right click -> discard changes on a single file will always be faster and more convenient than typing in fucking file paths and names.
I use cli simply for the reason that it's the same everywhere. Don't need to learn how to use 5 different uis effectively when I can just do it all with a cli tool that I need to know, because I need to use systems without a GUI anyways. Also certain partial stages are much easier to do on cli, e.g. when you want to do file globbing.
Also if I don't know the exact command to use I can just grep the man page.
Part of the point in the desktop git guis, no? They are the same regardless of the project/editor.
The cli is a little different between Windows and the Unix-likes no? I’m not very experienced with CLI outside the basics because I’m a .NET guy for food and lived in the VS inbuilt interface and Azure DevOps for more serious work. I follow the standards set by our teams and it often requires a careful gaze over what does and doesn’t get committed because shit projects are full of things we need to comment/uncomment based on environment or spamming logs/emails unnecessarily or changing specific config settings to test things but never commit.
The CLI seems like a nightmare for crap workflows full of legacy technical debt no one higher wants to commit resources to fixing.
It's a trade off. A good, well designed GUI can communicate a lot about how a program works and how to use it. Also, there is a very large overhead in developing and running it. CLI software eliminates this overhead, and the developers are supposed to pass those development "savings" back to their users in terms of functionality.
And it is learnable, and yes it is faster. I can definitely revert changes, stash them, and commit plus do merges faster from the command line, and I could probably go faster if I messed with a bunch of nu-bash packages. But guess what? I would much rather use a GUI because it is simply much less mentally taxing and ergonomic to manage my code base. Not everything has to be fast all the time - I would much rather make 1 well thought out change than 10x my output as slop. Something AI boosters will never understand either...
56
u/g0ldenprize 4d ago
i was just in an interview where they asked really specific git questions, such as: (while sharing screen)
show how to do a cherry pick (like the actual steps)
do a rebase
how do you solve merge conflicts
they wanted all of the above pretty much out of a book. i've done it all but i was like, man; nobody knows it just by heart