The first issue can be tackled by merging the dev branch into social-login/main, testing that everything works as normal, and then merging it back into dev:
$ git checkout social-login/main$ git merge dev$ git checkout dev$ git merge social-login/main
This way, any bugs that arise due to the incompatibility of the branches will remain on the feature branch, and not on dev. This gives us a chance to fix these bugs before merging back into dev.
While this solved one issue, it exacerbated the other. Our Git history now looks like this: