git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 3, 2012, 18:41 UTC
Message-ID
<7v391v5rgb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CABURp0rho3KvzHRNXj9EA9C2OnbTc_dcmiBiW6JZ-VHu4g2m0Q@mail.gmail.com>
Phil Hord <phil.hord@gmail.com> 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.
Show 9 quoted lines
>> 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?

Previous: Phil HordNext: Junio C Hamano
Message 16 of 22 in “Proposal: create meaningful aliases for git reset's hard/soft/mixed”
  1. Philippe VaucherNov 23, 2011
  2. Matthieu MoyNov 23, 2011
  3. Philippe VaucherNov 23, 2011
  4. Martin von ZweigbergkDec 18, 2012
  5. Nguyen Thai Ngoc DuyNov 23, 2011
  6. Junio C HamanoNov 23, 2011
  7. Philippe VaucherNov 23, 2011
  8. Phil HordDec 1, 2011
  9. Thomas RastDec 2, 2011
  10. Miles BaderDec 2, 2011
  11. Phil HordDec 2, 2011
  12. Philippe VaucherDec 2, 2011
  13. Phil HordDec 2, 2011
  14. Philippe VaucherDec 6, 2011
  15. Phil HordOct 3, 2012
  16. Junio C HamanoOct 3, 2012
  17. Junio C HamanoOct 3, 2012
  18. Jan EngelhardtDec 15, 2012
  19. Phil HordDec 1, 2011
  20. Martin von ZweigbergkDec 18, 2012
  21. Junio C HamanoDec 18, 2012
  22. Jeff KingDec 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.