1

There are two git repos in two machines.

Though from the same origin previously, they are different actually because my friend and I operate on them differently afterwards.

Now here is the problem.

I tried to pull from the other repo and I use:

git pull origin master

origin is my friend repo, which is located on the same local network. master is his main branch.

But git says my repo is already up-to-date.

They are different with different log info , different commit info and of course files.

So what maybe the cause? And how can I deal with it?

xiaohan2012
  • 8,986
  • 20
  • 64
  • 99
  • I suspect you may not be tracking the other remote - try git branch -vv --list master. The output will contain something like "master 450db23 [origin/master: behind 10] ....commit description...". If you are not tracking origin/master, you can fix that using "git branch --set-upstream master origin/master" – patthoyts Mar 23 '12 at 10:10

1 Answers1

1

Check if you are in a branch (instead of a detach HEAD)

See if the result of git branch returns a current branch (marked with a '*')
If so, see "Git Push Issues".

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755