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

Re: [PATCH] reset: Better warning message on git reset --mixed <paths>

From
RERalf Ebert <ralf@ralfebert.de>
Date
Aug 15, 2010, 21:05 UTC
Message-ID
<1281906304.32195.26.camel@lucy.SSG5-Serial-WLAN>
In-Reply-To
<7vr5hzg1u1.fsf@alter.siamese.dyndns.org>
> Regarding the various modes that are forbidden with "reset", I've been
> wondering if we can do things differently.

After being very happy about finding the 'soft-mixed-hard-path-cheat-sheet' table in 0e5a7fa (mentioned in Ævars message that triggered the discussion)

reset: --soft --mixed --hard -- <paths> HEAD X X X - index - X X X files - - X -

I was wondering:

Wouldn't the common reset soft/mixed/hard with path/commit operations become a lot more intuitive by separating the "(1) copy [partially] from HEAD to index [to working tree]" operation and the "(2) change HEAD and do (1)" operation? Just as a very rough scribble of what I mean, like this:

git wipe [<path>] # git reset [<file>]; git checkout [<file>] git wipe [<path>] --index-only # git reset [--mixed] [<path>]

git set-head <commit> # git reset --soft [<commit>] git set-head <commit> --wipe # git reset --hard [<commit>] git set-head <commit> --wipe-index-only # git reset --mixed [<commit>]

(I know that git reset can do more than that, but this is everything I ever wanted as porcelain-only user from git reset, thought maybe the idea could be of use without being fully elaborated)

-- Ralf

Previous: Ævar Arnfjörð BjarmasonNext: Jonathan Nieder
Message 13 of 18 in “reset: Better warning message on git reset --mixed <paths>”
  1. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 14, 2010
  2. Jonathan NiederAug 14, 2010
  3. Junio C HamanoAug 15, 2010
  4. Miles BaderAug 15, 2010
  5. Ævar Arnfjörð BjarmasonAug 15, 2010
  6. Junio C HamanoAug 15, 2010
  7. Jonathan NiederAug 15, 2010
  8. Junio C HamanoAug 15, 2010
  9. Ævar Arnfjörð BjarmasonAug 15, 2010
  10. Junio C HamanoAug 15, 2010
  11. Miles BaderAug 16, 2010
  12. Ævar Arnfjörð BjarmasonAug 16, 2010
  13. Ralf EbertAug 15, 2010
  14. Jonathan NiederAug 16, 2010
  15. David FriesAug 15, 2010
  16. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 15, 2010
  17. Junio C HamanoAug 16, 2010
  18. Ævar Arnfjörð BjarmasonAug 16, 2010

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.