1. you can see all the information at on glance: current branch, all local branches all remotes and remot branches, local changes, recent commits, current merge conflics
2. cherry picking single lines for staging in multiple files is much faster in a GUI than via terminal (maybe there are clever tricks to make it easier I don't know of)
2. Yes, that was the only reason I have used git GUIs, but most modern editors have these features built-in.
Still, usually what I need there is the ability to leave a line or two there but don't stage it.
You get more context because you can see other parts of the diff in the editor, unlike when using the -p switch with the git add or reset commands.
GitGutter make working with hunks easy
>> You cannot unstage a staged hunk.
I'm not sure if that's a feature they plan to support, but something like this could easily be done by highlighting the hunk displayed when running git diff --cached in vim's linewise visual mode and filtering it through git apply -R --cached -.
I guess you would not want to edit a text file of which you could only see a single line at a time.
Projects can be messy and sometime you really need a bird's view of what's going on with all those branches\merges etc.
I felt a certain bravado in uni for always using the cli that I see among other HNers. As I get older, I couldn't give less of a damn. Scrolling manpages to find an re-remember the unintuitive cli arg I need vs just clicking a button that does it? I prefer the latter. The former is always available if I need it.
The few times I have to drop into cli git are the things I always have to look up anyways, like git-reflog.
All of this is possible with the terminal tools, but made much easier with a GUI. It also makes it possible for non-experts to fix problems without just blowing away the repository and repeating work.
I'm still using GitX(l) on mac, it keeps dying and being resurrected as a fork, I've always found it the perfect balance between "too simple" and "too complex", and I can just launch it from the terminal "in context" when I need it.
I rely a lot on visualisation to understand things so I tend to like a nice Git GUI. Although some stuff like rebase -i I found it handy to do it in the terminal.
This. Personally I handle most of Git's CRUD operations through the command line, but to analyse logs and branches and navigate through the depository's history, I find gitk to be an invaluable tool, albeit ugly as sin.
I still always prefer the CLI and will use that first, but I'd feel silly dying on that hill for every situation.
Command line is great if you prefer it, but Fork, SourceTree and Tower all have interactive rebase support. Here's me using Fork:
https://twitter.com/mikemaccana/status/1237708418124742656?s...
I hacked together a bash script that prints out all the branches and lets you click on it to switch to it and it's been pretty useful, just wish I could be bothered to make it properly with more features.
I would love GUI tools to complement the command line, instead of replacing it. Already I use the CLI 95% of the time, and launch gitk for that 5% when I really need to see the commit tree graphically. Usually before a merge is the only time I do this.
I wonder if that's a way forward.. a graphical equivalent of "tab completion" when you are trying to write out a command. Instead of a GUI that tries to make git "simpler" by hiding the command-line, how about something that takes the git command you are already trying to write, and helps you write it, e.g. by showing you results of a dry-run on the fly.
Much rather not have a terminal in these apps. It'd probably not match 100% my normal terminal and would slow me down.
I wish people who made these things didn't start off with the implicit belief that they need to try to replicate every feature of the git client in a UI.
There are some other features like the git highlighting in a file is a quick and easy way to see how the code has changed without leaving, but anything besides a merge conflict is done on command line
I’m a big believer in high-quality GUI. I’ve used CLI that would have a lot of folks whimpering under their desks, and don’t miss them at all.
Bad GUI is worse than CLI, though. I won’t mention the product, but I tried another fairly well-known “buzzword-compliant” GUI client. For the first fifteen minutes, it was great. Then I tried something off their beaten path, and the dumpster started smoking.
SourceTree has a relatively spartan interface, but also updates rapidly, which is important for when I switch over to CLI.
Back in the day when SourceTree had the original built-in multiple repsitory overview it had something no other tool had (I think) and for the rest it was workable, but slow. Then they basically rewrote it, replaced the whole UI with something which was slower and less clear and did not even have the repository overview. I still don't understand why. Plus it still had the annoying problems where you'd be rebasing on the CLI and that would fail because at the same time SourceTree had the repository open. tldr; I admit I don't know it's current state, but at least when I left it it was not exactly a high-quality UI.
Anyway I ditched it for SublimeMerge around that point and even though it lacks certain functionality I didn't go back. Main reason is probably that the UI looks clear, has good diff/staging and proper keyboard support and a command palette. But just like other tools, it's not for everyone.
Like most developers, I've learned where the potholes are, and have warning cones around them.
I'd love a nicer GUI, but, like I said, my experience has me a bit gunshy about using other stuff. I've had Tower for a while, but seldom use it. It's a great app, but the GUI actually gets in my way a bit.
My favorite text editor is BBEdit. I've been using it since last century. It's kept up with the times, but has a much more spartan aspect than editors like VSCode and Sublime. I like its RegEx support; which I use all the time.
From the on I resolved to only use the cli, and over time it has become almost as easy to navigate as the guis - all the different cli tools are actually quite great when you get used to them.
The flip side is that I feel comfortable going deep and resolving all the weird edge cases as I can drop to as low level as I wish.
And if you are fighting with the complex stuff, you are probably doing it wrong. Then no GUI in the world can help you.
It really depends on what you mean by day-to-day operations.
If all you do is checkout code, create ephemeral branches that either get deleted or are merged into another low-traffic branch or are simply pushed to a remote git workflow system, sure you don't need a GUI for that.
But if you need to traverse branch history and compare changes and do three-way merges and audit changes and track logs to a specific file within a repo... You are far better off with a GUI.
Once I worked with teams, I started encountering things like difficult merges, long-running divergent branches, etc. that make GUI useful.
If there are more people in the first category, it's only because anyone can start a solo repo but only a subset of people work on teams.
Either way, who cares? Use what is useful to you.
Throughout these comments is this weird assertion that other people are using the wrong tool unlike us enlightened HNers. It's like people get offended that others prefer other tools. As if it's like "What, is my cli git preference not good enough for them?!"
I'm low-key convinced that's what's actually going on in all these cross-examinations.
Everyone who has to fix bugs and maintain software?
Most of the GUI tools just focus on the MVP workflow and often they crash/bug out on the weird cases.
This is not really an argument against it, but just an observation I made through the years.
Sourcetree is one of the oldest GUI git clients and it has the most stuff handled correctly, and this basically looks like open-source source tree.