This is a complicated situation, but essentially what has happened here is that our branch has become separated from master. So essentially:
A - B - C master
\
X - Y - Z feature
has turned into:
A - B - C master
(A) - (B) - X - Y - Z feature
The SHAs are the same for A/(A) and B/(B). This is exactly how it appears in GitK. At this point, I’m just trying to essentially put it back in the same order it was previously. Unfortunately, since the SHAs appear to be identical, I don’t know how I can manipulate X to branch out of B instead of (B). I honestly don’t know where to begin attempting this recovery. How can I reconnect the two branches at commit B?
Note that I have seen this question but it seems to be a slightly different issue, because the sha-1 of B and (B) are the same, since it has not been changed.
If you are sure the A/(A) and B/(B) are the same SHA hash, then I don’t see what the issue is, as X’s parent is B === (B) according to your diagram.
Is this all on a local repository? Are there any remote bare repositories involved?
Try running from the following to show the graph and put it in your question:
I replicated your setup with simple pushes and commits and this command gives (from the feature branch) :
If the SHA commits are as you suggest, you should see the same behaviour. If not, post an update with the isolated area you see at issue.