kahkeng
Re:Git undo: We can do better
on Monday June 21, 2021 @02:02PM (#27581808)
I find it pretty useful to use the `--patch` or `-p` option (also a mnemonic for "prompt") to various commands:
`git add -p`: prompt which hunks should be added to staging
`git checkout -p`: prompt which unstaged hunks should be thrown away
`git checkout HEAD^ -p`: prompt which hunks from HEAD should be discarded
`git reset -p`: prompt which currently-staged hunks should be unstaged
`git reset HEAD^ -p`: prompt which hunks from the HEAD commit should be unstaged
Nice thing is that you get interactive yes/no prompts with a preview of the change for each hunk, and you can also quit early if you realize it's not the command you want.
Doesn't fully address the potential for lost changes, but slows it down by adding an interactive roadblock for each change.
Re:Ask HN: What interesting problems are you working on?
on Wednesday January 29, 2020 @03:43AM (#22178597)
I believe this is the HN article you're referring to: https://news.ycombinator.com/item?id=22160572
Re:Yelp’s Six-Year Conflict with Google
on Wednesday July 05, 2017 @03:08AM (#14700428)
Yes I've noticed that this has become a worse experience over time. I used to be able to find previously visited sites easily but now I can't because suggestions take precedence over even exact substring matches of urls.