2

I am new to git and to version control in general, so bear with me.

I followed the directions at http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/ to create a git repository on a server. Note that it is a bare repository.

What I am unable to understand is where are the files stored on the server. They are not present in the folder in which the repo is created. The folder structure is like so (ls command):

branches  config  description  HEAD  hooks  info  objects  refs

I cannot find the files (bunch of sql files) anywhere in here. So where are they?

Note that git clone user@server.com:/path/to/repo from another local machine works fine.

arahant
  • 2,203
  • 7
  • 38
  • 62

3 Answers3

8

The files are in objects but in a few large binary files. You won't find the separate SQL files there. You really need to use the git command to access them.

Wolph
  • 78,177
  • 11
  • 137
  • 148
3

Git actually stores the information in objects, not flat files. You can read more about it here.

captbrogers
  • 475
  • 5
  • 15
0

From the git command line, switch to the directory where you have your repository and then run this command: git reset --hard HEAD. This will checkout the files for you to work on, from the objects under .git folder (which is a hidden folder under the folder in which you created/cloned your repo).

yasouser
  • 5,113
  • 2
  • 27
  • 41