Live data from Hacker News

Git undo: We can do better

blog.waleedkhan.name

1–10 of 490 posts

Re: Git undo: We can do better

#4
> Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes.

Here's something that happens when people are encouraged to make more mistakes: they make more mistakes.

The piece where people are encouraged to learn from these mistakes is missing from the author's equation. Without that, this tool becomes a crutch at best, and a disaster waiting to happen at worst.

Can we do better?

*Edit*: Let me answer my own question. We can do better - for example - simply by adding the Git commands this program would run, aside from the human readable explanation. Not sure what people replying to this comment were aiming for, since they clearly did not offer up a single suggestion.

Let me go a bit further and add that self-righteous soapboxes are NOT a good thing, and as it stands none of the replies to this comment were relevant. I was hoping to spark a discussion of what else could be done to improve the experience, but I could have worded my comment better.

On the other hand, you can do better.

Re: Git undo: We can do better

#5

> Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes. Here's something that happens when people are encouraged to make more mistakes: they make more mistakes. The piece where people are encouraged to learn from these mistakes is missing from the author's equation. Without that, this tool becomes a crutch at be…

Perhaps it should have been stated outright, but the operative theory appears to be that if mistakes cost less, making more of them becomes the learning exercise.

Re: Git undo: We can do better

#7
post #3

This seems like a very good idea. Only if we can scroll through the commit hashes and see the preview of commit with help of fzf or something similar, it will be totally awesome.

I use maggit and can scroll commit log using `ll`

You can also try `lazygit` it's a TUI written in Go

Re: Git undo: We can do better

#8

> Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes. Here's something that happens when people are encouraged to make more mistakes: they make more mistakes. The piece where people are encouraged to learn from these mistakes is missing from the author's equation. Without that, this tool becomes a crutch at be…

I wouldn't be so harsh. I don't know a single program that was made worse by adding undo. Imagine a painting program without it. (I'm sure there are some artistic programs that do that but those would be mostly toys)

Trying to learn from mistakes that can be solved by an undo on local repository are mostly in the realm of "be more careful", which is an impossible requirement to achieve in general.

Re: Git undo: We can do better

#9

> Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes. Here's something that happens when people are encouraged to make more mistakes: they make more mistakes. The piece where people are encouraged to learn from these mistakes is missing from the author's equation. Without that, this tool becomes a crutch at be…

The tool prints what it is going to do in a nice format. That is an opportunity for learning.

Re: Git undo: We can do better

#10

> Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes. Here's something that happens when people are encouraged to make more mistakes: they make more mistakes. The piece where people are encouraged to learn from these mistakes is missing from the author's equation. Without that, this tool becomes a crutch at be…

If your suggestion for making software better is to make mistakes so punishing that users are thusly properly conditioned to not repeat the mistake then... may I never use software you work on.

An analogy in my mind is a "hardcore"(where your in-game character permanently dies if you die once) mode in a game. On the surface, even it's name suggests that a really die hard power gamer is going to want to try this mode, the phrase beckons truly a true epic gamer experience that will test the players skill to the utmost. But, you don't get that. You get people getting level 2 by killing only level 1 critters for 10 hours straight (or equivalent), you get a boring, sterile, slow progressing gameplay that is exactly opposite of what one might imagine going into it.

Post reply on HN