Rebase and Merge does not Fast Forward

I started with two commits, A and B, master pointing at A which is older than B, and develop pointing at B. A git log --all --graph --decorate looks like this:

* commit 0af25aa3a4abea9f39ca4da6b7da23cf88546457 (HEAD -> develop, origin/develop)
| Date:   Thu Aug 27 12:22:23 2020 -0400
| 
|     test
| 
* commit 4ce64615c24e6e69d9afa18364aa2cd460c5ad89 (origin/master, master)
| Date:   Thu Aug 27 12:12:40 2020 -0400
| 
|     added new paragraph to demonstrate making a commit on a different branch.
| 

My goal here is to fast forward master so that develop and master are both pointing at commit B. The workflow I wish to do this with is creating a pull request on Github, to merge develop into master, without a merge commit. Just moving the master to point to commit B. When I do a “Rebase and Merge” on Github, instead of just moving the master head to commit B, I end up with this

 * commit 51f368d6aed9d2afae29b374d0ff17245f33f60a (origin/master)
| Date:   Thu Aug 27 12:22:23 2020 -0400
| 
|     test
|   
| * commit 0af25aa3a4abea9f39ca4da6b7da23cf88546457 (HEAD -> develop, origin/develop)
|/  Date:   Thu Aug 27 12:22:23 2020 -0400
|   
|       test
| 
* commit 4ce64615c24e6e69d9afa18364aa2cd460c5ad89 (master)
| Date:   Thu Aug 27 12:12:40 2020 -0400
| 
|     added new paragraph to demonstrate making a commit on a different branch.
| 

The remote master branch has created a new commit, instead of just pointing to commit B. Is it possible to achieve that with Pull Requests? Or would I potentially have to do the merging locally and then push the fast-forwarded master to remote?

Yes, exactly. There’s no way to way to fast forward from the web UI. However when you push the fast-forwarded master Github should detect that the commits in the pull request have been merged and mark it as merged.

Thanks for your reply! The documentation for this is then incorrect. From https://docs.github.com/en/github/administering-a-repository/about-merge-methods-on-github

When you select the Rebase and merge option on a pull request on GitHub, all commits from the topic branch (or head branch) are added onto the base branch individually without a merge commit. Pull requests with rebased commits are merged using the fast-forward option.

Huh, that’s odd! Two paragraphs down the actual behavior is described, so I guess the author meant to say the branch gets fast-forward merged after rebasing, which is a kind of important detail. :sweat_smile: