1

After calling the push command files are not on the server.

On my local computer i have test.git directory.

I type:

git init
git add .
git commit -a -m "First commit"
git remote add origin user@server.com:/var/www/test.git

On serwer i created new directory test.git inside git init --bare --shared

On local git push origin master And no new files appear on server Even after git push origin

Any ideas? Maybe i forgot something?

Krystian
  • 996
  • 9
  • 24
  • 1
    You have created a bare repository (which you should). A bare repository does not have a working directory. – Ikke Feb 29 '12 at 09:23
  • Which files are you talking about? The source files you added to your commit? You won't see them in a bare repository, since a bare repository only contains Git's internal “database” – knittl Feb 29 '12 at 09:23
  • 2
    To expand on the previous comment... The files in `server.com:/var/www/test.git/` should be the same (roughly) as those in the `.git/` directory in your local sandbox. – Lee Netherton Feb 29 '12 at 09:27

1 Answers1

2

You created your repo with --bare. That's mean you don't have a working directory. Try git log, you'll see your commit.

mathieug
  • 901
  • 1
  • 11
  • 24
  • can you please elaborate on this?....I'm hosting a git on ubuntu through ssh and I can see the commits with git log but not the files.....what does --bare mean?....I didn't find much info on this – JAF Feb 03 '16 at 13:24
  • 1
    @JAF http://stackoverflow.com/questions/7861184/what-is-the-difference-between-git-init-and-git-init-bare – mathieug Feb 03 '16 at 13:28