git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] reset: update help text

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 2, 2011, 08:43 UTC
Message-ID
<BANLkTi=m-MYaQZ8_u8-CAXPaVpJi9QDkTg@mail.gmail.com>
In-Reply-To
<20110331184246.GA19264@elie>
On Fri, Apr 1, 2011 at 1:42 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 18 quoted lines
> 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
Previous: Jonathan NiederNext: Junio C Hamano
Message 8 of 9 in “reset: update help text”
  1. reset: update help textNguyễn Thái Ngọc Duy, Mar 29, 2011
  2. Nguyen Thai Ngoc DuyMar 29, 2011
  3. Jonathan NiederMar 29, 2011
  4. Nguyen Thai Ngoc DuyMar 31, 2011
  5. Jonathan NiederMar 31, 2011
  6. Junio C HamanoMar 31, 2011
  7. Jonathan NiederMar 31, 2011
  8. Nguyen Thai Ngoc DuyApr 2, 2011
  9. Junio C HamanoMar 31, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.