0

When I push from my local machine to my remote repo with git it gives no errors. It counts the objects, compresses them and says: 'master > master'. But when I check my remote repo i only see the new branch, there no new files added to the directory. When I try to switch to that branch on the remote server with 'git checkout master' it says iam not in a working tree.

Can anybody help me?

Thanks

PS: The remote repo is initalized with: 'git init'

Roy van Zanten
  • 3,125
  • 2
  • 17
  • 12
  • Possibly duplicate of [this](http://stackoverflow.com/questions/5283262/what-is-a-git-work-tree-why-have-i-never-needed-to-set-this-as-an-env-var-why) – vpatil Feb 07 '12 at 12:06

1 Answers1

1

The remote repository is most likely a bare repo and created with git init --bare.

To see the files, create a separate non bare clone of the bare repository.

To verify the changes are in, use git log

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • I am pretty sure the server remote repo is not bare. Is there nothing else that can explain this? – Roy van Zanten Feb 07 '12 at 15:19
  • 1
    If it's not bare, you should not push into it. Git usually forbids pushing into the checked out branch. The effects on the index are very unintuitive to git beginners in such a case. – knittl Feb 07 '12 at 15:21
  • So if i push my code to my remote repo the intention of git is that i do not push the files but the changes made into branch? But what if i want to pull the code where do i get the files from then if i dont have the files? – Roy van Zanten Feb 07 '12 at 19:54
  • Also check out what Borealid posted on a previous git problem i had. http://stackoverflow.com/questions/9162271/fatal-not-a-valid-object-name-master#comment11527740_9162348 – Roy van Zanten Feb 07 '12 at 19:56