I thought I understood how git pull --rebase was working, but this example is confusing me. I would have guessed that the following two scenarios would produce identical res
Yes, your understanding of git pull --rebase is correct.
It’s because the commit 9e11404 has pushed to remote, while after that, the commit 2f25b9a is force update the remote (9e11404 if force removed from remote).
When Dan execute git pull --rebase, git detected 9e11404 and origin/branch is point to 2f25b9a. But git think 9e11404 has already exist in remote (.git\logs\refs\remotes\origin\branch has the content update by push 9e1140410af8f2c06f0188f2da16335ff3a6d04c), so it do nothing to rebase. Or you can use git pull --rebase=interactive to verify, you will find it shows noop to rebase. If you want to manually rebase 9e11404 on the top of origin/branch, you can add pick 9e11404 in interactive window, The result will be what you expected.