tags:

views:

51

answers:

1

We were sharing a GIT repository via file-sharing system (smb://) and got it badly corrupted (a power cut meanwhile the post-send :P). Being new to GIT, trying to fix it I made it even worse and I lost all the refs (left with the object folder).

Since the incident I haven't had the time to look at the problem and have just been keeping committing to my local clone.

So my question is : Is there a way to copy the local repository back to the location of the old repository and make it a shared repository in order to keep some track of previous the history ? That's all I could figure out (I'm still a git-noob), any other solutions are more than welcome !

Thanks in advance !

+4  A: 

From the question Is it safe to use a copied repo, you could simply:

  • clone --bare your local repo on your local machine
  • copy that bare repo on the share

That way you get back a pristine bare repo able to accept all your push operations.

VonC
Worked out nicely, thanks !
Theo.T