原文链接:https://blog.csdn.net/tian_ci/article/details/93397137
问题
进行git push操作时报错:fatal: The current branch master has no upstream branch.
**原因:**没有将本地的分支与远程仓库的分支进行关联
通过git branch查看本地分支只有master
通过git branch -a查看远程分支,有master和remotes/origin/master两个
这时由于远程仓库太多,且分支较多。在默认情况下,git push时一般会上传到origin下的master分支上,然而当repository和branch过多,而又没有设置关联时,git就会产生疑问,因为它无法判断你的push目标
使用git push --set-upstream origin master命令
使用git push -u origin master命令