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

Re: Add 'sane' mode to 'git reset'

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 1, 2008, 18:04 UTC
Message-ID
<gh1907$vu5$1@ger.gmane.org>
In-Reply-To
<32541b130812010944k3dd825e4pfa8c270ecc75d539@mail.gmail.com>
Avery Pennarun wrote:
> On Mon, Dec 1, 2008 at 12:30 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
Show 6 quoted lines
>> So add this kind of mode to "git reset", and since it's probably the
>> sanest form of reset (it will not throw any state away), just call it
>> that: "git reset --sane". It should probably be the default, but we likely
>> cannot change the semantics of a regular "git reset", even though it is
>> unlikely that very many people really use the current (insane) default
>> mode of "--mixed" that only resets the index.
[...]
> How about calling it --merge instead?  That's really what it does:
> merges the diffs from (your current index) to (the requested index)
> into (your working tree and your index).
I like it, because it is similar to how "git checkout --merge" works.
 
> Or --keep, because it keeps your working tree changes.
That is also better than --sane...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Avery PennarunNext: Linus Torvalds
Message 3 of 8 in “Add 'sane' mode to 'git reset'”
  1. Linus TorvaldsDec 1, 2008
  2. Avery PennarunDec 1, 2008
  3. Jakub NarebskiDec 1, 2008
  4. Linus TorvaldsDec 1, 2008
  5. Junio C HamanoDec 3, 2008
  6. Linus TorvaldsDec 4, 2008
  7. Document "git-reset --merge"Junio C Hamano, Dec 4, 2008
  8. Junio C HamanoDec 4, 2008

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.