I'm using Git and I'm in front of a several problem: I can push, my coworkers can pull it, and the opposite. But the version which is on the remote is not up-to-date: if I write a TEST in the html, nobody could see it except on the local version... I thought it could come from the branch which is on the remote... isn't it ?
EDIT 1 : I'll try to be more specific: I've a private repo which is on a private server. This server is used to host the website. When i commit -> pull -> push everything works great. When my coworker do the same, it's fine. On our local version, all the changes appear like my "TEST" test. But on the server, nothing is up to date. Is it the wrong branch, on the server or something?
PS : Sorry for my english, it's not my native language.
If you are doing a plain 'git push' you may need to do 'git push origin branchname' instead. Provided the file is committed, of course.
UPDATE: Check your .git/config file. You should have an origin specified and your branch should refer to origin. Maybe there is a mismatch.
[remote "origin"]
url = [your github repo]
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "yourbranch"]
remote = origin
merge = refs/heads/yourbranch
The question is quite unclear, but several things can go wrong.
You need to git commit
changes first. Otherwise your changes are simply not stored (unknown to git
).
You've committed on a special branch. In that case the commits are actually stored on the server, but not shown by default. Other users can the checkout the branch by performing
git checkout <branch>
detecting on which branch you are yourself can be done with
git branch
You and your workers use different remote servers. You can check this by running
git remote
to generate a list of installed remotes
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With