I created a remote repository for a number of my projects, so it is the destination of my push's. Contrary to the ideology of git, but it serves as a central repository.
However when I go to the *.git folders on the server there is a directory structure of the form:
- /branches
- /hooks
- applypatch-msg.sample
- commit-msg.sample
- etc
- /info
- exlude
- /objects
- 06
- 1c
- various hex numbers
- pack
- /refs
- /tags
- /heads
- master
- config
- description
- HEAD
What is going on here, I'm sure if I studied the inner working of git I would be able to figure it out, but where are the project files?
Update
I created the repo in the following way:
git remote add origin [email protected]:project_name.gitgit push origin masterWhen you are pushing to a bare repo (see "all about "bare" repos -- what, why, and how to fix a non-bare push"), you won't see your file in that repo, because by definition it has no working tree.
You can add a post-receive hook (like illustrated in this post-receive hook) in order to checkout (and see) your files:
/path/to/bare/repo.git/hooks/post-receive:
cd /path/to/bare/repo.git
GIT_WORK_TREE=/path/to/live/server git checkout -f
If you just want to see at the list of files (or their content) stored in that bare repo, you can do it without even having to clone said bare repo.
See "Accessing files of a repository from the Git server", provided you have a direct access to the bare repo server.
GIT_DIR=/path/to/bare.git git log --pretty=format: --name-only --diff-filter=A | sort | grep .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With