Thanks in advance for any help. I had an instance of Atlassian Stash, with a repository on it. The instance died, and the only thing I have left, is a couple of numbered folders that seem to be the ".git" folders of a repo (i.e. with the hooks, logs, refs, objects, subfolders inside). Is there any way to recreate the repositories from these folders? If so, how? Just to clarify, I don't have the files themselves, I only have the content inside these folders. I need to recreate the versioned files from this somehow.
Asked
Active
Viewed 1,257 times
4
-
1Is it a complete `.git` folder? I.e. with `HEAD` and `config` files too, as well as the `objects` directory? If so, try a normal `git clone` and see if it works. – Shahbaz Jan 28 '14 at 17:28
-
does `git reset --hard` work? – ksg91 Nov 25 '16 at 11:33
1 Answers
5
Try to do a git clone
of the .git folder
git clone file:///opt/git/project.git
If that works it will copy the Git repository.
Alternative: have you got any clients that have git pull
ed from the Atlassian Stash server lately? You can simply use the .git
repository of the freshest client as a new server repository.

Klas Mellbourn
- 42,571
- 24
- 140
- 158