'`git checkout refs merge` not merging with HEAD of `main`

I have a problem with GIT, where running: git checkout refs/remotes/pull/534/merge

on public repositories: https://github.com/raycast/extensions

According to docs it should simulate a merge which will happen when you merge the PR - I was expecting this to do simulate a merge with HEAD of main, but instead if merges with a weird commit back in history.

Am I missing something here ? It's a root cause for some other problems I have like detecting changed files by PR.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source