-2

I created a shared Git repository in the server:

git init --bare repo_name.git

All works fine, I can clone the repository to the local folder and commit the files to the repository.

But I do not see commited files in my repo_name.git directory in the server, only config files:

  • branches
  • config
  • description
  • HEAD
  • hooks
  • info
  • objects
  • refs

So there my committed sources are stored in the server?

RuF
  • 548
  • 1
  • 11
  • 31

1 Answers1

3

In any git repo the committed files are in the objects folder, named after the sha1 hash. The files you normally work with are not the committed files, but a copy to for you to make modifications. Since no one is making modifications on the server, you don't need that copy, so you create a bare repo without the copy.

user1937198
  • 4,987
  • 4
  • 20
  • 31