当我执行 git branch 命令时,结果显示我当前在 v0.2 分支上。
git branch
v0.1
* v0.2
但是当我执行 git push 命令时,它会显示 "当前分支的上游分支与当前分支的名称不匹配"。
git push
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:v1.1
To push to the branch of the same name on the remote, use
git push origin v0.2
最初我将这个分支命名为v1.1,但现在我已经在本地和远程将其重命名为v0.2。
我该如何一劳永逸地解决这个问题。