All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] git reset --recover
@ 2008-03-03 14:59 Ping Yin
  2008-03-03 15:13 ` Santi Béjar
  2008-03-03 17:02 ` Charles Bailey
  0 siblings, 2 replies; 7+ messages in thread
From: Ping Yin @ 2008-03-03 14:59 UTC (permalink / raw)
  To: Git Mailing List

Today i use git reset carelessly and lose all my changes!

To remind other people not do the same wrong thing, i share my
experience and propose a new option to avoid this happens again.
------------------------------------
foo
   .git
    bar
        file1
        file2
------------------------------------

In the direcotry structure above, i want to make bar as a repository
(which hasn't yet been tracked by foo repository). I should have done
this as follows

-------------------------------------------
cd bar
git init
git add
------------------------------------------

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!

So, can we introduce a --recover option for "git reset" to save the
foolish or careless people like me?

-- 
Ping Yin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-04  8:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-03 14:59 [RFC] git reset --recover Ping Yin
2008-03-03 15:13 ` Santi Béjar
2008-03-03 16:47   ` Ping Yin
2008-03-03 17:02 ` Charles Bailey
2008-03-04  5:21   ` Ping Yin
2008-03-04  7:42     ` Jay Soffian
2008-03-04  8:22       ` Ping Yin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.