Opening a GIT repository (or whatever this is that I have!)

Hostile

Gawd
Joined
Feb 24, 2004
Messages
694
A client sent us a ZIP of their Git repository. Basically it's a ZIP that had a TAR inside. Extracting that TAR gives me a bunch of folders with .git at the end of the folder name. Each subfolder from there contains folders with "branches", "hooks", "info", "objects" and "refs". There are also loose files, "config", "description" and "HEAD".

I'm trying to open these up in a desktop Git client but it's saying that these aren't "git repositories". How, or what, do I need to open these folders so all the versioning history and files can be browsed through?

Computer OS is Windows 7. I have no idea what the original environment was.
 
What's the code supposed to be in? Visual Studios?\

Typically the '.git' folder sits in the root folder along side the actual code project. You would then just point to that folder.

Are you using this?
GitHub Desktop
 
Sorry, I should have said I'm trying to use the desktop client from this site:

Git

Also, I do not know what the client used on their own to host the data or even what language it's in.

One caveat, the computer I'm using can't communicate with the home servers. It has to be able to open these local files without an internet connection.

I played with it some more and it looks like I can clone the repository from the folders that I have. I think that will work. I think the client said they sent us a "dump" of the repository, I have a feeling that they didn't send a copy of the repository but a dump of the files/changes that were in the repository. Does that even make sense?
 
Last edited:
I don't think your client knows what they're doing. It sounds like they sent over a copy of the .git folder inside the repository, which like you said holds the diffs, branch info ,etc. Have them resend it, but they need to send you everything that sits beside the .git folder in addition to the .git folder, because that stuff is important.
 
Yea, since the subfolders each load individually it would make sense that the root would also have the config, head and description files so Git knows to put it all together.

Forgot to say, thanks for your help!
 
Last edited:
Actually, this sounds to me like the upstream repo is a bare repo rather than a normal source-based repo. In a bare repo, all you'll see as a user looking at it is the metadata. Try this:

1) extra the tarball to a location on disk
2) create a new scratch directory and "cd" into it
3) perform a "git clone <path_to_extracted_tarball"

If it's a bare repo then it should clone into your scratch directory and you should see all of the source files you're expecting.
 
Back
Top