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

Re: [RFC] git reset --recover

From
Ping Yin <pkufranky@gmail.com>
Date
Mar 3, 2008, 16:47 UTC
Message-ID
<46dff0320803030847t42583badw1f5163d600a6fafb@mail.gmail.com>
In-Reply-To
<8aa486160803030713r7bdcf825sf994cbb20f096ccd@mail.gmail.com>
On Mon, Mar 3, 2008 at 11:13 PM, Santi Béjar <sbejar@gmail.com> wrote:
> On Mon, Mar 3, 2008 at 3:59 PM, Ping Yin <pkufranky@gmail.com> wrote:
>  > Today i use git reset carelessly and lose all my changes!
>  >
Show 9 quoted lines
>  >
>  >  but i fogot to type "git init" which results that file1 and file2 are
>  >  added to index of foo repository. I tried to revert the operation
>  >  using "git reset". And the tragedy happened at that time because i
>  >  made so fatal  a mistake that i typed "git reset --hard". And i lost
>  >  all my files in bar dir!
>
>  "git reset" was sufficient.
>
I know about this, but i was just too careless.
Show 8 quoted lines
>
>  >
>  >  So, can we introduce a --recover option for "git reset" to save the
>  >  foolish or careless people like me?
>
>  Another possibility would be to not delete a file that is absent in
>  both the old and new HEAD, even if it was in the index.
>
Sounds interesting.
>  Santi
>
-- 
Ping Yin
Previous: Santi BéjarNext: Charles Bailey
Message 3 of 7 in “[RFC] git reset --recover”
  1. Ping YinMar 3, 2008
  2. Santi BéjarMar 3, 2008
  3. Ping YinMar 3, 2008
  4. Charles BaileyMar 3, 2008
  5. Ping YinMar 4, 2008
  6. Jay SoffianMar 4, 2008
  7. Ping YinMar 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.