git创建分支、切换分支

小黑Neo

关注

阅读 216

2022-07-12

切换分支:

git checkout -b release-1.0

报错:fatal: The current branch release-1.0 has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin release-1.0

码云上初始化一个本地项目:
​​​http://git.mydoc.io/?t=180676​​

解决方法就是按照提示添加一下呗:

git branch --set-upstream-to=origin/remote_branch  your_branch

其中,origin/remote_branch是你本地分支对应的远程分支;your_branch是你当前的本地分支。


精彩评论(0)

0 0 举报