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

Re: git leaves repo in bad state in out-of-space situation

From
LHLuke Hutchison <luke.hutch@gmail.com>
Date
Apr 17, 2011, 19:09 UTC
Message-ID
<BANLkTimVBVwz7c4=U0-zHhAWztewWYs7Qw@mail.gmail.com>
In-Reply-To
<BANLkTim4=eKQ2wq73Lf5zrjOND-r1n0XCw@mail.gmail.com>
Hi Dmitry,
On Sun, Apr 17, 2011 at 9:38 AM, Dmitry Potapov <dpotapov@gmail.com> wrote:
> The repository is not borked, it's just your working tree is in an
> inconsistent state, but it is easy to fix:
>
> git reset --hard HEAD

Ah, sounds like my intuition that simply freeing up space and then re-pulling should have fixed the problem was wrong. Your explanation makes sense.

> BTW, did you mean "git pull" above? Because if you did "git push"
> then those bogus changes are at the server now.

No, I work with a centralized repository which requires push operations. I know this negates the benefit of distributed SCM.

Show 5 quoted lines
> It always helps to run "gitk --all" to see what you are doing.
> [...]
> So, the general solution is only one:
>
>  git reset --hard HEAD

Thank you for your patient responses to what turned out to be a very basic question! My typical git workflow is very simple and has worked fine until I ran out of disk space.

Luke
Previous: Dmitry Potapov
Message 3 of 3 in “git leaves repo in bad state in out-of-space situation”
  1. Luke HutchisonApr 17, 2011
  2. Dmitry PotapovApr 17, 2011
  3. Luke HutchisonApr 17, 2011

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.