I awoke this morning and looked at the commit history of one of my dev team's private repositories on BitBucket. I saw this:
Anonymous committed fcde879 MERGE
Merge branch 'develop' of https://bitbucket.org/abc/xyz into develop
This is, uh, somewhat unusual. My guess was that this was pushed from a new machine that didn't have git configured properly. Still, I was not sure why it was doing this. On BitBucket, it shows two separate hashes as the commit parents, but it does not have the "view raw commit" option of other commits.
I checked out that branch, pulled, and looked at the log manually.
sidious@DS-1:/path/to/repo$ git log -1 --format=raw
tree 2931d14f48e61eaf0bbe0660af5b5dd76c07f063
parent 6bb38dee681df7620ffa42b6790641a7873166f2
parent f59c82e19e3e79310a53e273bab78139c49ff063
author root <root@somemachine> 1437069530 +0000
committer root <root@somemachine> 1437069530 +0000
Merge branch 'develop' of https://bitbucket.org/abc/xyz into develop
As far as I can tell, the 6bb parent is on the develop branch and the f59 parent appears to be from a different branch. It is kinda hard to tell what is going on.
I searched but could not find an answer, and I need to get back to the grind, thus I posit my query here: why is git merging a branch into itself? Or, rather, why is this nomenclature being used as the commit message?
question from:
https://stackoverflow.com/questions/31463025/why-does-git-merge-a-branch-into-itself 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…