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

Re: confusion with some `git reset` commands

From
Kevin <ikke@ikke.info>
Date
Dec 18, 2014, 08:23 UTC
Message-ID
<CAO54GHAVMSYCHAoqH1OOSaUeHBdSmqTvzJLWWUa0_bO3CLy4zg@mail.gmail.com>
In-Reply-To
<2055441.uOK6yH3IMG@linux-wzza.site>

On Tue, Dec 16, 2014 at 7:39 PM, Arup Rakshit <aruprakshit@rocketmail.com> wrote:

Show 6 quoted lines
> Hi,
> ..
>
> But I am looking for any differences -
>
> a) git reset --soft and git reset --keep

git reset --keep is a safer version of git reset --hard. It will reset the working tree. but will abort when it has to overwrite uncomitted changes.

> b) git reset --hard and git reset --merge

git reset --merge does the same as hard, but keeps unstaged changes. When unstaged changes would need to be overwritted, it also aborts.

Previous: Arup RakshitNext: Christian Couder
Message 2 of 4 in “confusion with some `git reset` commands”
  1. Arup RakshitDec 16, 2014
  2. KevinDec 18, 2014
  3. Christian CouderDec 18, 2014
  4. Konstantin KhomoutovDec 18, 2014

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.