Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed
- From
Jan Engelhardt <jengelh@inai.de>
- Date
- Dec 15, 2012, 18:57 UTC
- Message-ID
- <alpine.LNX.2.01.1212151955330.14667@nerf07.vanv.qr>
- In-Reply-To
- <7vhaqb4bvb.fsf@alter.siamese.dyndns.org>
On Wednesday 2012-10-03 21:03, Junio C Hamano wrote:
Show 7 quoted lines
> >I said that "git reset --keep" started out as an ugly workaround for >the lack of "git checkout -B $current_branch". Now we have it, so >we can afford to make "reset --keep" less prominently advertised in >our tool set. As I already said back then, "reset --soft" also has >outlived its usefulness when "commit --amend" came, so that leaves >only these modes of "reset":
Soft is still useful, partway. Consider patch splitting (where easily possible):
$ git add foo.c bar.c $ git commit -m foo,bar [other commits] $ git rebase -i FOOBARCOMMIT^ [mark foo,bar for edit] $ git reset --soft HEAD^ $ git reset bar.c $ git commit -m foo $ git add bar.c $ git commit -m bar $ git rebase --continue