1

I can't recall how, but I came up with this weird repository state,

At the moment when I pulling from origin I'm getting two states in cycle.

Synced, which I expect.

From example.com:repo
 + 8b6ca37...f2508d7 HEAD       -> origin/HEAD  (forced update)
Already up-to-date.

In sync

By the way, this forced update message looks weird also. If I do another pull, I get next state.

Unsynced, when master is 3 commits ahead of origin/master.

From example.com:repo
 + 8b6ca37...f2508d7 HEAD       -> origin/HEAD  (forced update)
Already up-to-date.

3 ahead

If I do another pull, I get first state.

In other words if I'm just pulling again and again, I see two states "synced" ⇄ "3 ahead" rather than one.

Any ideas how to fix this, please?

Can someone explain how this happened?

z4y4ts
  • 2,535
  • 4
  • 21
  • 24
  • Does this happen when you're on anything but the `master` branch? Also, this may be related to http://stackoverflow.com/a/7365922/356746 but I'm not entirely sure. – Nic Dec 07 '11 at 16:22
  • I didn't tried this, and already got repo back to normal. So I can't try this now. Anyway, thanks for your comment. Let me update question with new info (I can't answer this question yet due to low reputation). – z4y4ts Dec 07 '11 at 16:26

1 Answers1

1

A friend of mine helped me to get repo back to normal.

The solution is pretty simple, though mystique.

> git push origin :HEAD
To git@mon.businessnetworks.com.ua:vmg.git
 - [deleted]         HEAD

> git pull
From example.com:repo
   739691a..8b6ca37  master     -> origin/master
Already up-to-date.

> git push origin HEAD
Everything up-to-date

I'll keep this question open in case if somebody wants to demystify this story and tell what has happened.

z4y4ts
  • 2,535
  • 4
  • 21
  • 24