27 points

I really never understood why one would need a GUI for git except for visualizing branches.

I feel like I’m crazy seeing so many people using clicky buttons for tracking files. I need like 4 commands for 95% of what I do and the rest you look up.

You’re already programming! Just learn the tool!

And now there’s a github CLI tool? I hate to beat a dead horse but Microsoft pushing their extended version of an open source tool/protocol is literally the second step of their mantra.

permalink
report
reply
9 points

FWIW not everyone using source control is a programmer. I’ve seen artists in game dev using GUI tools to pull new changes and push their assets.

permalink
report
parent
reply
3 points

That’s fair, there’s plenty of uses for source control.

I was speaking from a programming context though, as this is a programming community.

permalink
report
parent
reply
5 points

I primarily use GitHub CLI to interact with the GitHub API, not Git. I don’t really see it as an extension of the Git CLI, which I use much more frequently. Everything you can do with it can also be done through their REST API.

I use it for things that aren’t really git features, like:

Syncing repository admin, pull request, and branch control settings across multiple repositories

Checking the status of self-hosted actions runners

Creating pull requests, auto-approving them

permalink
report
parent
reply
1 point

Thanks for the explanation, that does sound useful.

permalink
report
parent
reply
4 points

Do you use the command line for everything? Do you edit with vim, view diffs with git diff, browse the web with links or lynx?

GUIs are useful tools. I’m happy with VSCode’s git integration. It’s just what I need for basic stuff like staging files and committing. I use the CLI whenever I want to do something like rebasing because I can type that command faster than I can figure out the GUI, but it would be stupid to artificially force myself to use the CLI for everything because of some kind of principal.

permalink
report
parent
reply
4 points

Yeah I actually just prefer the command line, I’ve never had to force myself to use it. I even tried using VSC for a bit recently but i couldn’t get myself to like it. I just use nvim with some plugins in a tmux session now and its productive as hell.

Of course I don’t browse the web with the command line. For merging branches, I always merge main into the working branch first, check conflict files, and go through the file finding the diffs and resolving them. I’ve used merge tools before that were sorta nice but I had my own issues with them.

Maybe it’s the type of programming I do. I don’t do any web stuff, so file count is down. For larger code bases I keep a non editor terminal up and will grep -re for word/phrase searching, find to look for specific files, etc. I’ll occasionally use an IDE, typically eclipse based because embedded, but I don’t find myself missing the features they add.

permalink
report
parent
reply
1 point

Of course I don’t browse the web with the command line.

That’s my point. Browsing the web with a command line tool is obnoxious - you use a GUI for tasks that you find easier/more pleasant to do with a GUI. The difference is where that line is. When I’m reviewing what work I’ve done and checking through my code for debugging statements and other cruft I don’t want to push, I prefer to have a nice tree view of my change set where I can click on an item, see what I’ve changed, select lines and stage them, select other lines and revert them, etc. I could do all of that with command line tools (though not that many have mouse support) but I already know how to do exactly what I want with VSC so why would I use anything else?

You’re already programming! Just learn the tool!

If someone is incapable of learning the tool, that’s an issue if they’re a developer. But your statement implies that everyone should use the CLI for everything. My point is that it’s a matter of preference. The CLI is not superior and GUIs aren’t superior. They’re both just tools and if you can get your job done quickly and efficiently, that’s all that should matter.

permalink
report
parent
reply
2 points

Checking the diff before commit, solve merge conflicts

Also if it’s well integrated into the IDE it feels less like using a separate tool. For 95% of what I do the ide/gui feels better (fetch, pull, push, commit, checkout, merge). Usually just 2-4 clicks and no need to type the branch name (ticket number and then some)

For Reflog, reset I use the terminal.

If I had to start github desktop or another seperate gui I would use the terminal that’s integrated into the IDE.

permalink
report
parent
reply
15 points

JetBrains IDEs, I don’t remember the last time I used the CLI.

permalink
report
reply
3 points

Good luck doing anything remotely complicated/useful in git with an IDE. You get a small fraction of what git can do with a tool that allows absolutely 0 scripting and automation.

permalink
report
parent
reply
5 points

It sounds like you don’t speak from experience. I have all the automation I need. It supports git hooks on top of IDE-only features like code checking.

If I have to fire up my CLI for some mass history rewriting (like changing an author for every commit), or when the repo breaks - so be it. But by not using the CLI I save my fingers and sanity, because committing a bunch of files is several click away with little to no room for error.

I can rebase, patch, drop, rename, merge, revert, cherry pick, and solve conflicts with a click of a button rather than remembering all the commands and whatnot.

permalink
report
parent
reply
1 point
*

There are automations. You can even add git hooks iirc. Mostly I find the lint and other code quality integrations nice to have in the IDE, since the inline results allow me to navigate directly to the code

Diffing is a lot easier too

permalink
report
parent
reply
2 points

This is the way

permalink
report
parent
reply
2 points

I was looking for this comment. PHP storm and git are like best friends. I very very rarely need to resort to the CLI and generally that’s for hard resetting after I screw something up

permalink
report
parent
reply
13 points
*

CLI
Though I will admit it took me a while to get there
git add -i is where the true magic begins

permalink
report
reply
2 points

TIL!

permalink
report
parent
reply
2 points

git log --graph --oneline --all

permalink
report
parent
reply
4 points
*
Removed by mod
permalink
report
reply
4 points

lazygit:

permalink
report
reply
3 points

Freaking love TUIs, it’s like they took the convenience of a GUI and the efficiency of the CLI and merged them. As a Neovim and Lazygit user myself it’s amazing what I can accomplish in but a few keypresses.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 1

    Monthly active users

  • 256

    Posts

  • 842

    Comments