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
Both the scenarios are not confusing, that's how push --force works.
I will not explain the first scenario because you also understand that. But in the second scenario when brian$ git push --force this happens, brian's local repository doesn't know anything about dan's push to the remote.
So it take brian's local copy & replace everything there in the remote because it's a force push.
The difference between git pull & git pull --rebase is,
git pull will compare the changes of origin & local. That's why even you have uncommited changes you can git pull.
git pull --rebase will not compare the changes with the local, but it takes everything from the origin. That's why you can't git pull --rebase if there are uncommited changes
Hope you understand what I said. Any questions??