After switching the git path, the branch will also change accordingly, so the branch on the previous server cannot be used, but the idea still displays the branch on the previous server.
So the solution is to execute on the console: git remote update origin --prune and it will be solved