Your git log shows that there is a lot of commits in the develop
branch that don't exist in the master
branch. The pull request correctly shows a list of these commits, that can be merged into the master
branch.
To list all commits from the develop
branch that are not part of the master
branch you can use the command git log master..develop
. This should match the list you see in the pull request.
From your git log it looks like develop
has been merged into master
previously. But since these merge commits are no longer in the master
branch, is it possible that someone have done a reset of the master branch to an eariler state? Possibly to roll back changes if you have a deployment to an environment synced to the master
branch?
Solution
To get master
in sync with develop
again:
- Checkout
develop
and pull
to make sure the branch is up to date
- Do the same thing with
master
- Merge
develop
into master
- Resolve the conflicts
- Push the
master
branch
Now master
will be in sync with develop
again and the list of commits in develop
that master
is lacking should be empty. List these commits with git log master..develop
. Your next pull request will only contain the commits you do after this merge.
Further investigation
If you want to investigate further how you ended up in this state you can use reflog
to see what changes that have been made to the master
branch. Fore example if one of the more recent commits in develop
previously has been part of the master
branch.
git reflog master
If you want to do this you can do it before you merge the branches so you can see how the history looked before the fix.