I created a git feature branch in the usual way:
git checkout develop
git checkout -b new_feature_branch
When the time came to merge the feature back into the main development branch, the merge produced a huge amount of conflicts (way more than expected since the main line hadn't changed very much).
On investigation, it appears that my feature branch has somehow managed to become orphaned from it's parent. The first 24 commits to this branch are missing from the history, as is the initial fork from the main line.
I know it's exactly 24 commits because they are listed in git reflog --all | grep new_feature_branch
.
Since these early commits are missing, the branch now seems to begin with a duplicate of the entire repository that produces a lot of conflicts when I try to merge it back into development.
How did this happen?
How can I recover the missing commits?