|
|
|
|
|
by ajays
4052 days ago
|
|
I'm an SVN user, and I'll have to move to git some day, but it's not winning any points for me :-( . I got bit by it recently. I had cloned a repo, and then a few weeks later, did % git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
I assumed the working copy was up-to-date, as git states.... but alas, no. I had to do a "git pull" to get the latest changes. Why doesn't git tell you that your copy is out of date? |
|
To have git contact the remote again, you can do "git fetch origin" (or just "git fetch"). Then git will tell you your copy is out of date compared to origin/master, if there's been commits on origin since.
If you commit things, then your copy will be ahead of origin/master, so origin/master is what is out of date and you need to git push: