this post was submitted on 09 Nov 2023
1273 points (98.3% liked)
Programmer Humor
32570 readers
108 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Honestly, just use a GUI. Graphical user interfaces were designed for a reason. I usually use SourceTree or the Git functionality built in to Visual Studio or VS Code.
It's good to know how things work under-the-hood (e.g understand Git's object model, some basic commands, etc) but don't feel like you need to use the command-line for everything.
In my experience, using GUIs is how people fuck themselves, and then I have to unfuck them via the command line.
Git's interface is bad, yes. It has a step learning curve, yes. But I truly think the only real way to overcome those obstacles is to learn how git works, learn all the nitty gritty details, not hide from them.
I use a GUI (GitKraken) to easily visualise the different branches I'm working on, the state of my local vs. the remote etc. I sometimes use the gui to resolve merge conflicts. 99 % of my gut usage is command line based.
GUI's definitely have a space, but that space is specifically doing the thing the command line is bad at: Visualising stuff.
lazygit or tig are terminal interfaces for git. very nice, best of both worlds imo. every action shows the git command ran at the bottom, and its a lot easier to see at a glance the status, diff, log, etc.
My take is use a GUI for anything read-only/nondestructive (i.e. anything that won't modify your local or remote state). It's nice for example to compare the state of two branches.
For anything that does changes make sure you know what's happening under the hood, otherwise you might shoot yourself in the foot. It's convenient for example to do a commit and push in one go, but then you lose the ability to edit any changes (you're forced to either do another commit, or change your local commit and force push).
In VSCode you can go to the Output pane and switch to Git - there you'll see everything that gets done through Git's CLI for whatever you do through the GUI (although it can be a bit noisy); same goes other GUI utils.