I have set up a repo at a server of mine like this:
> git init
> git config --local receive.denyCurrentBranch updateInstead
> git add *
> git commit -m "Init Git"
This is how I have pulled the repo, made some changes and pushed it back to the server:
> git clone ssh://user:password@host.com/backend
> git add *
> git commit -m "First Push"
> git push origin master
That all goes through without any problems!
If I now check the branches and logs I get on my server as well on my computer this:
> git log
commit 8f69afeffae2c44d6952dbb753a003deea2fbe2a
Author: Mac
Date: Thu Jun 21 17:47:19 2018 +0200
First Push
commit 787c90ee79a4f3da207a57fcca552ebb7087294c
Author: Server
Date: Thu Jun 21 17:43:46 2018 +0200
Init Git
> git branch -v
> * master 8f69afe First Push
That means both my computer as well as the server are up to date and should contain the same files. However, this is not true...
I have edited a file on my computer before I have committed it and pushed it back to the server with the message "First Push". The changes are made on my computer but I don't see the changes on my server.. How can that be if the server has received the push and says that he is on the same branch?
Do I have to checkout? How can I update the repo on the server as well?
If I pull the repo again to my computer, it says "All files are up to date"!
Kind regards and Thank You!