Usually, when two branches coincide in the same source code, they will hash and be displayed together. But I was in an interesting state (described in the title).
This is how I got there. I had an old branch from last week, and I combined a lot of changes from the master into it. At the moment it was fast forward and, besides, there was no difference with the master.
But when I merged the function branch into this branch (which pretty much had the same state as master), it ended as follows:
* b0dc045 - (new-branch) refactored it. seems to work fine | * 4b89219 - (HEAD -> feature, origin/feature) refactored it. seems to work fine |/ * Merge branch 'master' into 'feature' |\ ...
'master' is somewhere below ...
Anyway, git diff new-branch feature doesn't show diff ... but they got different hashes .....
What things can I check to really see where they really differ?
Update:
I think that aspects of the history of the branch are included in the data set generating the hash. This explains the discrepancy.
So I did a quick and dirty trick.
$ diff <(git log new-branch) <(git log feature) 1c1 < commit b0dc045b82cfc2f7060ccd3b28dd1b1ca1cf2a59 --- > commit 4b8921960cc8f1d42e3e4d1b505228a2dc0c0638
This shows that the hash is different on the first line. This is the mysterious part. It also shows that the remaining 24 thousand lines of git log are identical.
source share