{"thread":{"id":"23141","subject":"Master branch not updating","startedAt":"2010-03-22T16:43:32Z","lastAt":"2010-03-23T07:34:15Z","messageCount":4,"participants":["Jacopo Pecci","Thomas Rast","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137564","messageId":"295c22191003220943o2ef330ddk58a8180411ddbb2b@mail.gmail.com","threadId":"23141","inReplyTo":null,"subject":"Master branch not updating","fromName":"Jacopo Pecci","fromEmail":"jacopo.pecci@gmail.com","sentAt":"2010-03-22T16:43:32Z","receivedAt":"2010-03-22T16:43:32Z","isPatch":false,"sender":{"key":"jacopo.pecci@gmail.com","avatar":null},"body":"Hi,\nI have a simple local project, with only the master branch. After few\ncommits with Git Extensions, I have realized the label [master] was\nstuck, it was not pointing at the latest commit any more. Nevertheless\nI could see a full list of all my new commits with the proper comments\nin the main window.  It looked like I was not on any branch (if this\nis possible)\nThen I have tried “checkout master branch”, suddenly all the commits\nin between the one labelled [master] and the latest one vanished. I\nhave not been able to get back.\n\nI am terribly afraid I have lost 4 day work. Do you have any\nsuggestion? How is it possible that something which I have committed\nis not retrievable anymore.\n\nI beg someone to help me\n\nThanks, Jacopo\n"},{"id":"137565","messageId":"201003221747.50504.trast@student.ethz.ch","threadId":"23141","inReplyTo":"295c22191003220943o2ef330ddk58a8180411ddbb2b@mail.gmail.com","subject":"Re: Master branch not updating","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-03-22T16:47:49Z","receivedAt":"2010-03-22T16:47:49Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jacopo Pecci wrote:\n> Hi,\n> I have a simple local project, with only the master branch. After few\n> commits with Git Extensions, I have realized the label [master] was\n> stuck, it was not pointing at the latest commit any more. Nevertheless\n> I could see a full list of all my new commits with the proper comments\n> in the main window.  It looked like I was not on any branch (if this\n> is possible)\n> Then I have tried “checkout master branch”, suddenly all the commits\n> in between the one labelled [master] and the latest one vanished. I\n> have not been able to get back.\n> \n> I am terribly afraid I have lost 4 day work. Do you have any\n> suggestion? How is it possible that something which I have committed\n> is not retrievable anymore.\n\nRead this very nice article by Sitaram Chamarty:\n\nhttp://sitaramc.github.com/concepts/detached-head.html\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"137569","messageId":"4BA7A640.1080207@viscovery.net","threadId":"23141","inReplyTo":"295c22191003220943o2ef330ddk58a8180411ddbb2b@mail.gmail.com","subject":"Re: Master branch not updating","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-03-22T17:17:52Z","receivedAt":"2010-03-22T17:17:52Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 3/22/2010 17:43, schrieb Jacopo Pecci:\n> Then I have tried “checkout master branch”, suddenly all the commits\n> in between the one labelled [master] and the latest one vanished. I\n> have not been able to get back.\n> \n> I am terribly afraid I have lost 4 day work. Do you have any\n> suggestion? How is it possible that something which I have committed\n> is not retrievable anymore.\n\n1. Don't panic.\n\n2. Make a backup copy, *including* the .git directory (very important!)\n\nThe .git directory contains your 4 day work, and it is very likely still\nretrievable.\n\nIt may be a simple matter of\n\n   git branch the-lost-state HEAD@{1}\n\nIf you can't work on a command line, then git extensions certainly has\nsome nice UI that lets you create a branch at a particular revision. In\nthis case, the branch name is \"the-lost-state\", and the revision is HEAD@{1}.\n\nYou can try more branch names at HEAD@{2}, HEAD@{3} (you get the point).\nIt means, roughly, \"the state where HEAD was 1, 2, 3, etc. git operations\nago\".\n\n-- Hannes\n"},{"id":"137610","messageId":"295c22191003230034m63eec998wf2f8e552fb28b07c@mail.gmail.com","threadId":"23141","inReplyTo":"4BA7A640.1080207@viscovery.net","subject":"Re: Master branch not updating","fromName":"Jacopo Pecci","fromEmail":"jacopo.pecci@gmail.com","sentAt":"2010-03-23T07:34:15Z","receivedAt":"2010-03-23T07:34:15Z","isPatch":false,"sender":{"key":"jacopo.pecci@gmail.com","avatar":null},"body":"THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!\nI managed to recover all and actually the article made me understand a\nbit more Git.\n\nJacopo\n\n\nOn Mon, Mar 22, 2010 at 7:17 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:\n> Am 3/22/2010 17:43, schrieb Jacopo Pecci:\n>> Then I have tried “checkout master branch”, suddenly all the commits\n>> in between the one labelled [master] and the latest one vanished. I\n>> have not been able to get back.\n>>\n>> I am terribly afraid I have lost 4 day work. Do you have any\n>> suggestion? How is it possible that something which I have committed\n>> is not retrievable anymore.\n>\n> 1. Don't panic.\n>\n> 2. Make a backup copy, *including* the .git directory (very important!)\n>\n> The .git directory contains your 4 day work, and it is very likely still\n> retrievable.\n>\n> It may be a simple matter of\n>\n>   git branch the-lost-state HEAD@{1}\n>\n> If you can't work on a command line, then git extensions certainly has\n> some nice UI that lets you create a branch at a particular revision. In\n> this case, the branch name is \"the-lost-state\", and the revision is HEAD@{1}.\n>\n> You can try more branch names at HEAD@{2}, HEAD@{3} (you get the point).\n> It means, roughly, \"the state where HEAD was 1, 2, 3, etc. git operations\n> ago\".\n>\n> -- Hannes\n>\n"}]}