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

confusion with some `git reset` commands

From
Arup Rakshit <aruprakshit@rocketmail.com>
Date
Dec 16, 2014, 18:39 UTC
Message-ID
<2055441.uOK6yH3IMG@linux-wzza.site>
Hi,
>From the command help I see - 
[arup@to_do_app]$ git reset -h
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] 
[<commit>]
   or: git reset [-q] <tree-ish> [--] <paths>...
   or: git reset --patch [<tree-ish>] [--] [<paths>...]
    -q, --quiet           be quiet, only report errors
    --mixed               reset HEAD and index
    --soft                reset only HEAD
    --hard                reset HEAD, index and working tree
    --merge               reset HEAD, index and working tree
    --keep                reset HEAD but keep local changes
    -p, --patch           select hunks interactively
But I am looking for any differences -

a) git reset --soft and git reset --keep b) git reset --hard and git reset --merge

-- 
================
Regards,
Arup Rakshit
================
Debugging is twice as hard as writing the code in the first place. Therefore, 
if you write the code as cleverly as possible, you are, by definition, not 
smart enough to debug it.

--Brian Kernighan
Next: Kevin
Message 1 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.