{"thread":{"id":"24598","subject":"Newbie in Git. How to get back from last pull?","startedAt":"2010-08-01T08:06:06Z","lastAt":"2010-08-01T10:11:15Z","messageCount":6,"participants":["Yankovsky","Ramkumar Ramachandra","Miles Bader","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"146904","messageId":"1280649966984-5360499.post@n2.nabble.com","threadId":"24598","inReplyTo":null,"subject":"Newbie in Git. How to get back from last pull?","fromName":"Yankovsky","fromEmail":"yankovskyandrey@gmail.com","sentAt":"2010-08-01T08:06:06Z","receivedAt":"2010-08-01T08:06:06Z","isPatch":false,"sender":{"key":"yankovskyandrey@gmail.com","avatar":"https://gravatar.com/avatar/b6d427b23b7a2d986ea4618eab4af1f0aa366a36a8798f5b6087e7cf27c81d7c?d=mp&s=160"},"body":"\nHi!\nI have commited all my changes, and accidently typed git pull, then was\npaniced and aborted the operation. now all my changes in project disappear.\nbut i have commit. how can i restore my project status using this commit?\nI hope you understand my rus english)\nThanks.\n-- \nView this message in context: http://git.661346.n2.nabble.com/Newbie-in-Git-How-to-get-back-from-last-pull-tp5360499p5360499.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"146905","messageId":"20100801083000.GF26006@kytes","threadId":"24598","inReplyTo":"1280649966984-5360499.post@n2.nabble.com","subject":"Re: Newbie in Git. How to get back from last pull?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-01T08:30:02Z","receivedAt":"2010-08-01T08:30:02Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Yankovsky,\n\nYankovsky writes:\n> I have commited all my changes, and accidently typed git pull, then was\n> paniced and aborted the operation. now all my changes in project disappear.\n> but i have commit. how can i restore my project status using this commit?\n> I hope you understand my rus english)\n\nI don't understand exactly what you want to do, but here are the\nbasics- you can decide what you want to do.\n1. Use `git reflog` to see a history of your operations.\n2. If you want your working copy to switch to an existing commit, use\n   `git checkout <SHA1 of commit>`.\n3. If you want to irreversibly destroy everything and switch your\n   working copy to a desired commit, use `git reset --hard <SHA1 of\n   commit>`. Use with care!\n\nHope that helps.\n\n-- Ram\n"},{"id":"146906","messageId":"87bp9mbsp0.fsf@catnip.gol.com","threadId":"24598","inReplyTo":"20100801083000.GF26006@kytes","subject":"Re: Newbie in Git. How to get back from last pull?","fromName":"Miles Bader","fromEmail":"miles@gnu.org","sentAt":"2010-08-01T09:14:35Z","receivedAt":"2010-08-01T09:14:35Z","isPatch":false,"sender":{"key":"miles@gnu.org","avatar":"https://gravatar.com/avatar/01069b69593af7bff28e2f97afeb3644ae6fe2f5f56cb3a8cf34c5fb8c36efe5?d=mp&s=160"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n> I don't understand exactly what you want to do, but here are the\n> basics- you can decide what you want to do.\n> 1. Use `git reflog` to see a history of your operations.\n> 2. If you want your working copy to switch to an existing commit, use\n>    `git checkout <SHA1 of commit>`.\n> 3. If you want to irreversibly destroy everything and switch your\n>    working copy to a desired commit, use `git reset --hard <SHA1 of\n>    commit>`. Use with care!\n\n... and:  0. In \"emergency recovery situations\", _back up your whole\nsource dir (including .git subdir) somewhere else before screwing\naround_!\n\nE.g., \"cp -a my_src_dir /somewhere_else/my_src_dir_backup\"\n\n-Miles\n\n-- \nPray, v. To ask that the laws of the universe be annulled in behalf of a\nsingle petitioner confessedly unworthy.\n"},{"id":"146908","messageId":"m2k4oaptk0.fsf@igel.home","threadId":"24598","inReplyTo":"87bp9mbsp0.fsf@catnip.gol.com","subject":"Re: Newbie in Git. How to get back from last pull?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-08-01T09:32:15Z","receivedAt":"2010-08-01T09:32:15Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Miles Bader <miles@gnu.org> writes:\n\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>> I don't understand exactly what you want to do, but here are the\n>> basics- you can decide what you want to do.\n>> 1. Use `git reflog` to see a history of your operations.\n>> 2. If you want your working copy to switch to an existing commit, use\n>>    `git checkout <SHA1 of commit>`.\n>> 3. If you want to irreversibly destroy everything and switch your\n>>    working copy to a desired commit, use `git reset --hard <SHA1 of\n>>    commit>`. Use with care!\n>\n> ... and:  0. In \"emergency recovery situations\", _back up your whole\n> source dir (including .git subdir) somewhere else before screwing\n> around_!\n\nIMHO the very first step should be to run \"git status\" and see what it\nsays.  With that information it would be much easier to recommend\nfurther steps.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"146909","messageId":"1280656961746-5360639.post@n2.nabble.com","threadId":"24598","inReplyTo":"20100801083000.GF26006@kytes","subject":"Re: Newbie in Git. How to get back from last pull?","fromName":"Yankovsky","fromEmail":"yankovskyandrey@gmail.com","sentAt":"2010-08-01T10:02:41Z","receivedAt":"2010-08-01T10:02:41Z","isPatch":false,"sender":{"key":"yankovskyandrey@gmail.com","avatar":"https://gravatar.com/avatar/b6d427b23b7a2d986ea4618eab4af1f0aa366a36a8798f5b6087e7cf27c81d7c?d=mp&s=160"},"body":"\nRamkumar, thank you!\nit works!\nAwesome)\n-- \nView this message in context: http://git.661346.n2.nabble.com/Newbie-in-Git-How-to-get-back-from-last-pull-tp5360499p5360639.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"146910","messageId":"1280657475602-5360649.post@n2.nabble.com","threadId":"24598","inReplyTo":"87bp9mbsp0.fsf@catnip.gol.com","subject":"Re: Newbie in Git. How to get back from last pull?","fromName":"Yankovsky","fromEmail":"yankovskyandrey@gmail.com","sentAt":"2010-08-01T10:11:15Z","receivedAt":"2010-08-01T10:11:15Z","isPatch":false,"sender":{"key":"yankovskyandrey@gmail.com","avatar":"https://gravatar.com/avatar/b6d427b23b7a2d986ea4618eab4af1f0aa366a36a8798f5b6087e7cf27c81d7c?d=mp&s=160"},"body":"\nyes, i did this)\nGuys, thanks a lot!\nreally, i didn't expect help this quick!\n-- \nView this message in context: http://git.661346.n2.nabble.com/Newbie-in-Git-How-to-get-back-from-last-pull-tp5360499p5360649.html\nSent from the git mailing list archive at Nabble.com.\n"}]}