csablotron
csablotron

Reputation: 11

file doen't appear on git repository

i've trying to set git server/client

my setting on:

SERVER (ubuntu 12.04)

  • folder web in: /web/site
  • git: /web/site/site.git
  • git init --bare <<< in site.git folder

CLIENT (Mac OSX 10.7)

  • mkdir /Application/MAMP/htdocs/site
  • cd site
  • git init
  • touch README
  • git add README
  • git commit -m 'tambah README'
  • git remote add origin ssh://[email protected]/web/site/site.git
  • git push origin master

why on server side, my README file doesn't appear? i just found site.git folder

[email protected]'s password:

Counting objects: 3, done.

Writing objects: 100% (3/3), 209 bytes, done.

Total 3 (delta 0), reused 0 (delta 0)

To ssh://[email protected]/web/site/site.git

  • [new branch] master -> master

Thanks before :)

Regards,

doni

Upvotes: 1

Views: 106

Answers (2)

EinLama
EinLama

Reputation: 2406

A bare repository does not contain a working directory.

You can nevertheless review the current files on the master branch by using

git ls-tree -r master

This will list all objects recursively. Your README file will show up there.

Another way is to clone the repository to another directory. But if you just want to verify that everything is there, this is unnecessary.

Upvotes: 1

Yanflea
Yanflea

Reputation: 3934

Because you have a bare repository on the server side. A bare repository contains no working files.

Upvotes: 0

Related Questions