I use Azure Dev Ops and have a master branch and a very fresh dev branch that had master as "parent".
Master has a policy that it can only be changed by pull requests.
When I make some changes in the dev branch, commit and push them I want those changes also "going back" into the master branch.
So I start a pull request for dev to master. There are no conflicts and I can complete the pull request/merge.
So, all is fine? But when I create a new pull request right away, again from dev to master, it lists me again the previous commit from dev. Shouldn't it (git/Azure Dev Ops) know, that this git has already been merged into master?
I thought I was being clever and now merged master into dev, thinking that this is maybe needed that dev is up-to-date (knowing the latest merge of the dev-commit into master - yes, I realize this is very likely silly). Then pushing this merge and checking in Azure Dev Ops. But now dev is ahead 2 commits and when I start a new pull request from dev to master, it now lists me the two commits as part of the new pull request. The first commit (which is already in master and the merge commit (master to dev).
So, I am now a bit confused and I believe I have never noticed this before. I thought that normally git knows, that commits have been already merged by a pull request and don't list them again and again.
Is there something wrong maybe with the master branch and if yes, how could I fix this?