问题
You asked to pull from the remote 'origin', but did not specify a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
##增加一个远程分支,并且将该远程分支命名为origin
git remote add origin https://github.com/XXX(username)/YYYY(projectname).git
##设置本地master分支默认对应的远程分支是origin下的master分支
git branch --set-upstream-to=origin/master master
一个分支的upstream,其实就是与远程分支做关联,告诉git,默认此分支为推送及拉取的远程分支的信息。
例如我的一个例子上的配置
[remote "ddjf"]
url = https://gitee.com/anna-prince/ddjf.git
fetch = +refs/heads/*:refs/remotes/ddjf/*
[branch "master"]
remote = ddjf
merge = refs/heads/master
rebase = false
[branch "jf20200119"]
remote = ddjf
merge = refs/heads/jifen20200119
rebase = false
本地有两个分支,master和jf20200119,对应的远程分支ddjf
来源:CSDN
作者:yaoshengting
链接:https://blog.csdn.net/ystyaoshengting/article/details/104050599