Git undo: We can do better
blog.waleedkhan.name
Git undo: We can do better
1–10 of 490 posts
Re: Git undo: We can do better
#2Re: Git undo: We can do better
#3Re: Git undo: We can do better
#4Here'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…
Re: Git undo: We can do better
#6`git reflog` `git reset --hard `
Or if you just want to move back 1 commit
`git reset HEAD@{1}`
Re: Git undo: We can do better
#7This 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.
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…
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…
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…
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.