我很难理解错误试图告诉我的内容。我在Githhub上创建了一个新的存储库,然后远程添加了给定的链接。作为一个总菜鸟,任何建议将不胜感激!
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.
答案 0 :(得分:2)
看起来你是在'develop'分支而不是你的主人操作,这不允许你'推动原始主人'。当你在一个分支机构中运行时,你可以将它合并到你的主机github中,或者甚至可能'cd ..'到你的主仓库然后再尝试''git push origin master''。也是一个菜鸟,所以希望这有帮助!