git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Thomas Rast <trast@student.ethz.ch>
Subject: Re: [PATCH] reset: update help text
Date: Sat, 2 Apr 2011 15:43:44 +0700	[thread overview]
Message-ID: <BANLkTi=m-MYaQZ8_u8-CAXPaVpJi9QDkTg@mail.gmail.com> (raw)
In-Reply-To: <20110331184246.GA19264@elie>

On Fri, Apr 1, 2011 at 1:42 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Nguyen Thai Ngoc Duy wrote:
>
>> To be honest, I have no idea what the above describes. I read 9bc454d
>> (reset: add option "--keep" to "git reset" - 2010-01-19) and figured
>> that --keep is like --merge except that "git diff" before and after
>> the reset is exactly the same, is it? I have never used --keep before.
>
> I use "git reset --keep" to
>
>  - discard a bad commit: git reset --keep HEAD^
>  - start working against a different commit:
>
>        git checkout -b topic &&
>        ... hack hack hack without committing ... &&
>        : "oops, I thought I was on master but I was somewhere else" &&
>        git reset --keep master
>
> ..

Thanks. Your changes make sense to me now.
-- 
Duy

  parent reply	other threads:[~2011-04-02  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 13:20 [PATCH] reset: update help text Nguyễn Thái Ngọc Duy
2011-03-29 13:29 ` Nguyen Thai Ngoc Duy
2011-03-29 21:04 ` Jonathan Nieder
2011-03-31 12:31   ` Nguyen Thai Ngoc Duy
2011-03-31 18:42     ` Jonathan Nieder
2011-03-31 21:44       ` Junio C Hamano
2011-03-31 21:57         ` Jonathan Nieder
2011-04-02  8:43       ` Nguyen Thai Ngoc Duy [this message]
2011-03-31 18:45   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=m-MYaQZ8_u8-CAXPaVpJi9QDkTg@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).