Live data from Hacker News

Oh Shit, Git

ohshitgit.com

131–140 of 237 posts

Re: Oh Shit, Git

#131

I find people are religious about being git cli purists and only interacting with it in this black box (the terminal). On top of that a lot of people stop learning git after add commit push pull branch and merge so concepts like rebasing and cherry picking are scary. In this day and age we have state of the art GUI tools that change the game and allow git users to see and interact with the state of a git repository i…

> I find people are religious about being git cli purists […] we have state of the art GUI tools

I would humbly suggest you avoid framing it that way, even if you believe it’s true. From someone who is only sometimes a cli advocate, my immediate assumption is that your opinion here may be formed out of naïveté and a bit of fear of the cli.

Please note I’m actually quite a fan of using various GUI tools for basic git workflows, and things like branching diagrams and even diffs are much better in GUI tools than in the console. Some of the tools are damn good and damn convenient most of the time. So you’ll get a huge amount of agreement from me about the benefits of sometimes using GUIs.

But git was designed around the command line, and there are no GUI tools (Kraken included) that have UI for everything or even most of what git can do. Advanced workflows and repo spelunking often require the command line. Using the cli is the only interface that can do everything, and it’s the advanced interface, so telling people who are already advanced (possibly more advanced than you) and already comfortable on the command line that they’ll find enlightenment in GUI tools isn’t always or even generally true. It’s not hard on the command line to see everyone else’s remote branches. Better to listen to them, and suggest GUI tools only when they express frustration about their workflow that you think a GUI can help with. Also perhaps better to ask the about CLI workflows and find out some of the benefits. One benefit is that CLI workflows are always usable over basic ssh connections.

And worth mentioning, the question’s partially moot for people using Github or other hosting services where some GUI tools are built-in. Using the CLI for all interactions with Github, and using the site for the visualizing diffs & branches is totally reasonable.

> I’ve worked on teams that just didn’t rebase at all and I think people are oblivious to the mess they make

I have to fully back you up and agree there! It’s unfortunate that rebase is a little scary and that some people just don’t like it. Rebasing local work before publishing it is the way git was designed to work, and it’s extremely helpful for creating a history that’s not insane. Squash commits are better than nothing I guess, but you can really tell and appreciate when people are comfortable with rebase and care whether their history is presentable.

Re: Oh Shit, Git

#132

I find people are religious about being git cli purists and only interacting with it in this black box (the terminal). On top of that a lot of people stop learning git after add commit push pull branch and merge so concepts like rebasing and cherry picking are scary. In this day and age we have state of the art GUI tools that change the game and allow git users to see and interact with the state of a git repository i…

I'd just like to fess up here. I use github desktop because I'm fucking lazy. No one knows this because I work from home.

Re: Oh Shit, Git

#133

Earlier quoted context omitted.

As a counter point. Every time I've seen people get themselves into trouble with git has been when they are using a GUI tool. I have yet to see a gui tool that they can use to get themselves back out of it. There's a lot of value in knowing your way around the command line side of git even if you regularly use gui tools to interact with the repository.

I've had the exact opposite experience. I've had to bail out cli purists because they just can't see what went wrong. Objectively git kraken has more visual information density. To get the same information on the cli requires multiple commands and the user has to hold the information I'm their head between the commands. Git kraken's buttons are also tightly correlated to commands and you can even bring up a window th…

What does Gitkraken have that lazygit and tig don't have? The fundamental assumption here is that the the CLI doesn't have GUI's.

Re: Oh Shit, Git

#134

I find people are religious about being git cli purists and only interacting with it in this black box (the terminal). On top of that a lot of people stop learning git after add commit push pull branch and merge so concepts like rebasing and cherry picking are scary. In this day and age we have state of the art GUI tools that change the game and allow git users to see and interact with the state of a git repository i…

I think the thing that’s at the root of most git issues is the lack of atomic commits. Most people I know commit at the “block of work” or “ticket” level. Once they have the thing they wanted done, they commit. It means that fundamentally they can’t cherry pick, and rebasing occurs on huge blocks of code instead of single lines.

It’s not there yet, but I kind of think git should be used the way I started using the save option when computers were less reliable. Type a sentence, save. Type another sentence, save.

Re: Oh Shit, Git

#136

I find people are religious about being git cli purists and only interacting with it in this black box (the terminal). On top of that a lot of people stop learning git after add commit push pull branch and merge so concepts like rebasing and cherry picking are scary. In this day and age we have state of the art GUI tools that change the game and allow git users to see and interact with the state of a git repository i…

No post body was provided.

Re: Oh Shit, Git

#137
post #76

Earlier quoted context omitted.

You shouldn’t present your own opinions as facts. I find Git intuitive, and it works as I expect it to do. I suspect a lot of people agree since Git became the champion of the DVCS crusades.

Good modern software always offers an undo option. Where is "git undo"?

It’s the first thing in the article. Git reflog. (BTW you won’t get any disagreement from me about the lack of intuitiveness of the command name. But, in a way, git’s whole reason for existing is to undo, and almost everything you do in git can be undone by design.)

Re: Oh Shit, Git

#138

Earlier quoted context omitted.

I've had the exact opposite experience. I've had to bail out cli purists because they just can't see what went wrong. Objectively git kraken has more visual information density. To get the same information on the cli requires multiple commands and the user has to hold the information I'm their head between the commands. Git kraken's buttons are also tightly correlated to commands and you can even bring up a window th…

What does Gitkraken have that lazygit and tig don't have? The fundamental assumption here is that the the CLI doesn't have GUI's.

Those are TUIs, not CLIs. You're conflating "CLI" and "terminal".

Re: Oh Shit, Git

#139
post #76

Earlier quoted context omitted.

You shouldn’t present your own opinions as facts. I find Git intuitive, and it works as I expect it to do. I suspect a lot of people agree since Git became the champion of the DVCS crusades.

Good modern software always offers an undo option. Where is "git undo"?

  git reset HEAD~1 
Usually works good enough for me. Idk if this is the proposed way to undo stuff

Re: Oh Shit, Git

#140

Earlier quoted context omitted.

Or you can spend some time once to understand how git works, and never run into a similar situation again. git is built on a beautiful and very simple model, and it's easy to unbreak the repository 99% of time if you understand it (and I'm saying this as a very mediocre programmer).

Depends. Sometimes it's easier to tear down everything and start from scratch.

It's never easier to delete and re-clone. Proof: there's a reset command that does that but easier (once you know it.)
Post reply on HN