Hacker News new | ask | show | jobs
by _fbpt 2497 days ago
I use prezto's 2-3 letter aliases. But that doesn't help when I run `git reset --hard` (or gwR) and erase changes I don't know exist.

I wish I could move HEAD to a different commit (git reset), and apply (new HEAD - old HEAD) to my working directory (--hard), but abort if working directory != old HEAD.

In fact, this sounds like `git reset --keep`, but unfortunately prezto doesn't have an alias for that.

I don't like prezto's git-reset aliases. gwr is "move HEAD", gir is "move HEAD and reset index", and gwR is "move head, reset index, and reset working directory". I wish gwr was renamed to ghr, and maybe gar (git apply reset) for --keep.