4

I have a cloned repo I use for the live site and I have it pull from a bare repo. For some reason every time I execute "git pull" I get the already up to date message. But it's not up to date and not updated. If I do a git reset --hard HEAD^ and then git pull again, the changes come in.

What's the problem here and how do I fix it so that git pull will pull and merge changes in without needing a hard reset?

Chris
  • 988
  • 3
  • 18
  • 30
  • Please provide more details, it sounds like you really are up to date. When you do `git reset --hard HEAD^ && git pull` does `HEAD` really change? What does `git rev-parse HEAD` show before and afterwards? – CB Bailey Apr 23 '10 at 08:02

1 Answers1

3

That would be the case if are working on a DETACHED HEAD (see this SO question for more)

gitk detached head

That happens when you checkout directly a SHA1 commit reference, for instance.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250