Reputation: 3198
This is not a question about the hidden .git
folder!!
I typically use GitHub for most of my Git work. When working with the remote server, I might have my push and fetch configured as such:
$git remote -v
origin [email protected]:<my_org>/<my_repo>.git (fetch)
origin [email protected]:<my_org>/<my_repo>.git (push)
The question here is specifically about that <my_org>/<my_repo>.git
file.
I know that it "contains" all of the machinery required for a repository: the files, the index, hooks, references, etc. I have been "imagining" that it is a hierarchical zip file that is essentially just the entire repository as it would look locally if I were to zip it all up.
<blah>.git
file just a zip of the repository? How do I generate it?git init
and git push
or each time I git clone
? (Is this really just a zipping and unzipping?)git init -g
command or something similar to create a .git
file.<blah>.git
file (beyond the link above)?
".git"
turns up the hidden directory, not the file.<blah>.git
file on my machine, can others then use my machine as a remote repository?
Upvotes: 1
Views: 904
Reputation: 1324757
No: repo.git
it is a folder representing a bare repository (no working tree, just the repo files)
The compression/decompression only occurs for delta encoding of the pack files, which are then transmitted during clone/pull/push.
If you want to build only one "zip" file, see git bundle
, which produces a full Git repo as one file.
Upvotes: 2