tags:

views:

91

answers:

3

I am setting up git between two AWS instances (call them A and B). I can pull from A fine and see changes in those files on B.

If I create a new file on B and commit it, when I push from B to A, all seems to go well (I get the git message about writing objects...done) but I don't see the files on the A machine. On the A machine, git status says that those files have been deleted.

How come I never see the pushed files and why does git think they were deleted?

A: 

If it was apparently successful then it would be apparent that there was success. However, it seems like you apparently are having issues.

Justin
push is opposite to fetch, and does not update working directory. That is the problem that changes are 'not seen'
Jakub Narębski
+6  A: 

Roll your working directory forward on A. A push is like a fetch done backwards, not like a pull done backwards. It doesn't affect the working directory.

git checkout $YOUR_BRANCH

Do that on machine A after pushing from B.

Autocracy
+3  A: 

See question Why won't I see changes in the remote repo after "git push"? in "Unexpected behaviour" section in GitFaq page on Git Wiki.

Jakub Narębski
From the link: "A quick rule of thumb is to never push into a repository that has a work tree attached to it, until you know what you are doing."
Pat Notz