After merge of release branch, why is master 1 commit ahead of develop?

The issue is that the merge commit is being detected. Your commit history probably looks something like this:

*------------------ A [master]
 \                 /
  *---*---*---*---B [develop,release]

Commit B is, as you mention, 5 commits ahead of master. When you merged the release branch back into master, this created a merge commit, A. That merge commit does not yet exist in develop.

This is not something that you need to worry about, because the merge commit doesn't contain any changes itself, it only merges the two histories together. Normally, that commit will automatically end up in develop next time you finish a hotfix branch anyway.

Tags:

Git

Git Flow