Re: [git-users] bad repo

2014-04-08 Thread Dale R. Worley
One thing you can do is run "git fsck" on the repo.  It will check
whether it thinks the repository is properly structured.

> From: Konstantin Khomoutov 

> 1) Copy (literally) the whole project directory onto a
>filesystem/storage which is in the known good state.
> 2) Copy it again somewhere else to have a "reference" "post-mortem"
>snapshot.
> 
>Any recovery procedures are then to be taken on the copy obtained on
>step (1).  If you think you've spoiled it during the steps you'll
>be carying, just replace it with the copy obtained on step (2)
>and start over.

Actually, "If you think you've spoiled it during the steps you'll be
carying, just make *another* copy of (2) and replace (1) with the new
copy."  Do not change copy (2) until you *know* your problem is
solved.

Dale

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] bad repo

2014-04-08 Thread Konstantin Khomoutov
On Mon, 7 Apr 2014 19:41:27 -0700 (PDT)
fpefpe  wrote:

> One of my GIT repo got corrupted -- are there any tools to figure out
> what when wrong?

In addition to what John asked -- what do you mean by "corrupted"?
The problem is that this word mean different things to different people.

If you mean that Git behaves strangely on that repository and hence you
might suspect a faulty storage or filesystem (or both) then the check
list is:

1) Copy (literally) the whole project directory onto a
   filesystem/storage which is in the known good state.
2) Copy it again somewhere else to have a "reference" "post-mortem"
   snapshot.

   Any recovery procedures are then to be taken on the copy obtained on
   step (1).  If you think you've spoiled it during the steps you'll
   be carying, just replace it with the copy obtained on step (2)
   and start over.

Now the only thing Git provides for you to try to repare a damaged repo
is `git fsck` ("fsck" is an ond Unix-y acronym of File System
ChecK [*]).  You can run this tool to try to recover as much objects as
it will be able to.  The usual way to call it is with the "--lost-found"
command-line option -- see the manual page.
After it finished, you'll be able to inspect what it resurrected and
possibly scavenge something from that.
If not, or it the tool failed you're most probably out of luck.

In any case, if you have a clone somewhere it's better to just re-clone
the repository.  You should only mess with `git fsck` if your repo
contained some precious unpushed data you'd like to recover.

[*] Yet some people beleive it's named this way because it may
fsck a filesystem up beyond any recognition; YMMV.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] bad repo

2014-04-08 Thread John McKown
You might want to post which OS - Linux, Mac, or Windows. Which version of
git. And any error messages you have gotten.

BTW - I have _no_ idea myself on how to diagnose this sort of thing. But I
know that the "old, wise ones"  will want the information.


On Mon, Apr 7, 2014 at 9:41 PM, fpefpe  wrote:

> One of my GIT repo got corrupted -- are there any tools to figure out what
> when wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] bad repo

2014-04-07 Thread fpefpe
One of my GIT repo got corrupted -- are there any tools to figure out what 
when wrong?  

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.