'Maybe you have already found this issue?'
No, I haven't.
Read the comments about each command in the list.
git branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE
git checkout MOODLE_39_STABLE
To get this other site fixed, you might have to do a sideload and replace the .git directory in original code directory.
"fetch will download any changes from the remote* branch, updating your repository data, but leaving your local* branch unchanged.
pull will perform a fetch and additionally merge the changes into your local branch.
What's the difference? pull updates you local branch with changes from the pulled branch. A fetch does not advance your local branch."