How to fix «Your configuration specifies to merge with the ref 'refs/heads/2.3-develop' from the remote, but no such ref was fetched» on `git pull`?

01

git checkout 2.4-develop
git branch --unset-upstream
git branch --set-upstream-to=origin/2.4-develop 2.4-develop
git pull

stackoverflow.com/a/48100062