我已经完成了R语言课程(Coursera课程)中的第二个编程作业。
之后,我将我的本地仓库与GitHub账户上的全局仓库关联,并进行了提交和
之后,我将我的本地仓库与GitHub账户上的全局仓库关联,并进行了提交和
push -u origin master
操作。但是我遇到了以下错误: ! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/RofaidaG/ProgrammingAssignment2'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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.
我创建了一个分支并切换到主分支,然后在我的get账户中拉取了repo,但是我收到了以下消息:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我该怎么办?
git pull
命令吗?因为答案似乎与上面失败的 git push 相同。 - MarkSkayff