Git主分支没有上游分支。

47

我试图将我的一个项目推送到Github,但是一直出现以下错误:

fatal: The current branch master has no upstream branch.

我以前从来没有见过这个。我重新初始化了我的git,重新添加了我的origin,删除并重新创建了repo,重建了我的SSH密钥。

11个回答

-1

你需要先配置远程仓库,然后再进行推送。

git remote add origin url-to-your-repo

instructions


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接