I'm using msysGit 1.7.6 on Windows XP SP3.
I have a project with 2 tracking branches (let's call them b1 and b2 -> b1) and a submodule (let's call it sub).
After creating b2 from b1, I checked out another revision of sub in b1, and then merged b1 into b2 with --no-ff.
Now, b2 has a strange behavior. 'git submodule update' doesn't do anything. If I run 'git log' I can see the checkout, but if I run 'git log sub' I don't see it.
I tried checking out the later revis开发者_Go百科ion using 'git checkout' in sub, but it is treated like a change from HEAD. After checking it out, running 'git diff HEAD' shows there is a difference, 'git diff HEAD^1' also shows the difference, but 'git diff HEAD^2' shows there is NO difference!
What am I doing wrong? Is this a bug?
Ok, it was my fault... The merge apparently failed, but I didn't notice it (it's part of a larger script).
Just needed to add -X theirs to the merge. Now it works.
精彩评论