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

Re: Master branch not updating

From
JPJacopo Pecci <jacopo.pecci@gmail.com>
Date
Mar 23, 2010, 07:34 UTC
Message-ID
<295c22191003230034m63eec998wf2f8e552fb28b07c@mail.gmail.com>
In-Reply-To
<4BA7A640.1080207@viscovery.net>

THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! I managed to recover all and actually the article made me understand a bit more Git.

Jacopo
On Mon, Mar 22, 2010 at 7:17 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 30 quoted lines
> Am 3/22/2010 17:43, schrieb Jacopo Pecci:
>> Then I have tried “checkout master branch”, suddenly all the commits
>> in between the one labelled [master] and the latest one vanished. I
>> have not been able to get back.
>>
>> I am terribly afraid I have lost 4 day work. Do you have any
>> suggestion? How is it possible that something which I have committed
>> is not retrievable anymore.
>
> 1. Don't panic.
>
> 2. Make a backup copy, *including* the .git directory (very important!)
>
> The .git directory contains your 4 day work, and it is very likely still
> retrievable.
>
> It may be a simple matter of
>
>   git branch the-lost-state HEAD@{1}
>
> If you can't work on a command line, then git extensions certainly has
> some nice UI that lets you create a branch at a particular revision. In
> this case, the branch name is "the-lost-state", and the revision is HEAD@{1}.
>
> You can try more branch names at HEAD@{2}, HEAD@{3} (you get the point).
> It means, roughly, "the state where HEAD was 1, 2, 3, etc. git operations
> ago".
>
> -- Hannes
>
Previous: Johannes Sixt
Message 4 of 4 in “Master branch not updating”
  1. Jacopo PecciMar 22, 2010
  2. Thomas RastMar 22, 2010
  3. Johannes SixtMar 22, 2010
  4. Jacopo PecciMar 23, 2010

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.