Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:56
Phil Hord [off-list ref] writes:
I flagged this for followup in my MUA, but I failed to follow-up after the holidays. I apologize for that, and I really regret it because I liked where this was going.
I really regret to see you remembered it, actually.
quoted
1) Newbie user clones/pulls a repository from somewhere. He hacks around and then things go bad, and he decides to scratch away everything he did to make sure things are like they're supposed to be. He'd then type "git checkout --force --clean master". If he didn't introduce new files, he would simply type "git checkout --force master"I like this just fine. I think we can explicitly say that HEAD is the implied default refspec, yes? "git checkout --force --clean"
That depends on what the "hacks around" involved. Where is he now, what damage did he cause, and what can you depend on to take him to a "clean" state, where the definition of "clean" happens to match this hypothetical "Newbie user"? Did he do "git checkout" of another branch? Did he commit? Did he "reset" to other commit while on the 'master' branch? Is he still on "master" branch when he says "git checkout --force --clean <master>"? Can he say "git checkout --force --clean master~4" and what does that even mean? Is he trying to go into the detached HEAD state, or is he somehow trying to rewind master?