错误:无法将某些引用推送到新仓库

3

我有点难以理解这些错误都想要告诉我什么。我在Github上创建了一个新的存储库,然后远程添加了给定的链接。作为一个完全没有经验的新手,我需要一些建议!

Neelesh@Neelesh-PC MINGW64 ~/Desktop/RCB_Classwork/Introduction_work (develop)
$ git push origin master
To https://github.com/ntekal/Professional.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/ntekal/Professional.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
1个回答

2

看起来你正在使用 'develop' 分支而不是主分支,这导致你无法 'push origin master'。由于你在分支内操作,你可以将其合并到 github 的主分支中,或者甚至 'cd ..' 到你的主 repo,然后再次尝试 'git push origin master'。我也是新手,希望这可以帮到你!


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