Re: git leaves repo in bad state in out-of-space situation
- From
- Luke 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