git push 出现 The current branch dev has no upstream branch.的问题
git - 'set-upstream’有什么作用?
git push
# 出现报错 fatal: The current branch b has no upstream branch.
原因: 没有与远程分支建立连接
解决方案:
git push -u origin 分支名
-u 是 --set-upstream 的简写,用于设置当前本地分支的默认远程分支,使我们下次推送该分支时直接使用 git push 即可