From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Engelhardt Subject: Re: Proposal: create meaningful aliases for git reset's hard/soft/mixed Date: Sat, 15 Dec 2012 19:57:57 +0100 (CET) Message-ID: References: <7vlir6brjw.fsf@alter.siamese.dyndns.org> <7v391v5rgb.fsf@alter.siamese.dyndns.org> <7vhaqb4bvb.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Phil Hord , Philippe Vaucher , git@vger.kernel.org, Christian Couder To: Junio C Hamano X-From: git-owner@vger.kernel.org Sat Dec 15 19:58:19 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TjwwD-00087I-Us for gcvg-git-2@plane.gmane.org; Sat, 15 Dec 2012 19:58:18 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751450Ab2LOS6A (ORCPT ); Sat, 15 Dec 2012 13:58:00 -0500 Received: from ares07.inai.de ([5.9.24.206]:34736 "EHLO ares07.inai.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338Ab2LOS57 (ORCPT ); Sat, 15 Dec 2012 13:57:59 -0500 Received: by ares07.inai.de (Postfix, from userid 25121) id 126F496A1090; Sat, 15 Dec 2012 19:57:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ares07.inai.de (Postfix) with ESMTP id E1BB696A108F; Sat, 15 Dec 2012 19:57:57 +0100 (CET) In-Reply-To: <7vhaqb4bvb.fsf@alter.siamese.dyndns.org> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Wednesday 2012-10-03 21:03, Junio C Hamano wrote: > >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