Re: [PATCH] reset: Better warning message on git reset --mixed <paths>
- From
- Ralf 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