已经add了的,但是还未commit,不小心执行了git reset --hard
-
find .git/objects -type f | xargs ls -lt | sed 60q
(60q是查看之前的60个提交,这里只截取了一部分)
-r--r--r-- 1 ll809 197609 100 Dec 3 21:47 .git/objects/19/d7bb1179fd7066d33cd5 40f8794af66ab18e25
-r--r--r-- 1 ll809 197609 109 Dec 3 21:47 .git/objects/8f/117b95ee4bc127a3e96d 85795383efd9e04fb2
-r--r--r-- 1 ll809 197609 92 Dec 3 21:47 .git/objects/c4/4e8646d46569ad05bd41 fae2aed5e1085b588b
-r--r--r-- 1 ll809 197609 247 Dec 3 21:47 .git/objects/d9/273a94cac237e60b171e cba1941bb27d055463
-r--r--r-- 1 ll809 197609 245 Dec 3 21:47 .git/objects/e5/d2d013c4f4c13840fcc3 79189e5802e3f93616
-r--r--r-- 1 ll809 197609 328 Dec 3 21:47 .git/objects/06/ca26a2f75378a9e7410b 1c833c219daf547652
-r--r--r-- 1 ll809 197609 309 Dec 3 21:47 .git/objects/30/3b8926e95e04f4a84054 9d6e7a997d35f43048
-r--r--r-- 1 ll809 197609 316 Dec 3 21:47 .git/objects/54/d496078d88b8b5ab8ea9 813e61bf23e10ad0b8
-r--r--r-- 1 ll809 197609 268 Dec 3 21:47 .git/objects/a8/bb09f2091d23c968f548 0232405602269d5022
-r--r--r-- 1 ll809 197609 313 Dec 3 21:47 .git/objects/f3/52e59372bdf56fb3935e a8fd548ebd2662d7fe
-r--r--r-- 1 ll809 197609 333 Dec 3 21:47 .git/objects/62/57ebb8b22fe15d1dc237 8ca87f970de59aa0d0
-r--r--r-- 1 ll809 197609 337 Dec 3 21:47 .git/objects/6c/4dafc4e1eb2ffbec17a6 20f77a2bc56a5b973f
-r--r--r-- 1 ll809 197609 239 Dec 3 21:47 .git/objects/a7/c8aaba76e1df388d5c7d 08b89326e59a291fff
-r--r--r-- 1 ll809 197609 306 Dec 3 21:47 .git/objects/e3/0bbf0d202d223bff587a f6d95fa9dcf9f4954f
-r--r--r-- 1 ll809 197609 301 Dec 3 21:47 .git/objects/44/f36892409afe92515cc9 56cb2a00c5fbb571ba
-r--r--r-- 1 ll809 197609 301 Dec 3 21:47 .git/objects/96/5b531f12be19fb15e721 67f610f492dece6024
-r--r--r-- 1 ll809 197609 317 Dec 3 21:47 .git/objects/d8/7594397621a885b35c71 5f8e4502ac5b8b2b31
-r--r--r-- 1 ll809 197609 303 Dec 3 21:47 .git/objects/d8/be7bb47213ae64100b2d e4cddee9192300d4d9
-r--r--r-- 1 ll809 197609 297 Dec 3 21:47 .git/objects/21/4793810d4172f0a164fe c05b3d2190e1985604
-r--r--r-- 1 ll809 197609 92 Dec 3 21:47 .git/objects/14/cdb631712c4909c51e87 3d8b2b68736ad7e2a6
-r--r--r-- 1 ll809 197609 65 Dec 3 21:47 .git/objects/32/023e0f13992b181b20a2 81eb5c89d13dc5f1cb
-r--r--r-- 1 ll809 197609 210 Dec 3 21:47 .git/objects/3f/1dbc77b2b553b58750be 5194466f7291e5d293
-
git cat-file -p 19d7bb1179fd7066d33cd5 > ~/Documents/b1.html
恢复文件重定位到~/Documents/b1.html(这里比较麻烦,要一个个的恢复)