本地分支无法push,提示"fatal: The current branch ..."
问题描述
fatal: The current branch test has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin test
执行git push --set-upstream origin test
就可以了,为什么?
参考方案
就是让你指定当前分支的上游分支,不然不知道你想推到哪个分支,因为本地分支和远程分支名称并不限制必须一致。