每当我尝试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:5.4
To push to the branch of the same name on the remote, use
git push origin 5.5
当我检查状态时:
$git status
On branch 0.2
Your branch is up to date with 'origin/5.4'.
如何将5.4重命名为母版“来源/母版”?
答案 0 :(得分:0)
由于使用simple
value for push.default
,因此收到此错误。一种选择是更改push.default
(例如更改为upstream
),但是重命名本地分支更简单,因为在本地和远程端您将不会拥有相同名称的不同名称
要从5.4重命名为5.5,请执行以下操作:
git branch -m 5.4 5.5