Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed
- From
- Philippe Vaucher <philippe.vaucher@gmail.com>
- Date
- Nov 23, 2011, 11:32 UTC
- Message-ID
- <CAGK7Mr7+5x2+=7H=UQhVw56coBO7J4Ot8weckAg=V2TujLM9BQ@mail.gmail.com>
- In-Reply-To
- <vpq4nxvusty.fsf@bauges.imag.fr>
>> Optional: a new mode would be introduced for consistency: >> --worktree (or maybe --tree): only updates the worktree but not the index > > That would be an alias for "git checkout <rev> -- path", right?
Hum... yeah probably, what motivated me was that there's a way to reset the index and not the worktree, but there's no way to reset the worktree but not the index. I guess it's "checkout" as you pointed out.
Show 7 quoted lines
>> --keep could be removed in favor of an additional --safe flag > > If you are to change the option names, then you should also make the > behavior safe by default: > > * "git reset --all" = "git reset --keep" > * "git reset --all --force" = "git reset --hard"
Yes that's actually much better. Let's change my proposal to that.
Philippe