Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Dec 2, 2011, 15:28 UTC
- Message-ID
- <CABURp0qcHaoi58EQ1FLGo2atPuWfS5x4p_SK7ZA_AqV7as212w@mail.gmail.com>
- In-Reply-To
- <201112020826.14114.trast@student.ethz.ch>
On Fri, Dec 2, 2011 at 2:26 AM, Thomas Rast <trast@student.ethz.ch> wrote:
Show 15 quoted lines
> Phil Hord wrote: >> >> Think outside the "reset" command. Like this: >> >> From the "most popular" comment on http://progit.org/2011/07/11/reset.html: >> > I remember them as: >> > --soft -> git uncommit >> > --mixed -> git unadd >> > --hard -> git undo >> >> I don't particular like these names, but conceptually they are helpful. > > I think all of these, but the last one in particular, are *very* > dangerous oversimplifications. Doubly so if you then use "undo" with > a revision argument.
I agree. That's why I also said this:
> How about: > --soft: git checkout -B <commit> > --mixed: git reset -- <paths> > --hard: git checkout --clean
But maybe I wasn't clear enough. I'm not suggesting git-alias for these. I am proposing new commands to replace common usages of git-reset. These commands would need basic safeguards against foot-shooting, of course.
Phil