作为我正在学习的在线课程的一部分,我对git还很陌生。
当前正在学习教程,当我第一次按下master时收到以下错误消息:
$ git push -u origin master
To https://github.com/-/myappsample.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/-/myappsample.git'
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.
我尝试了git拉动,但也不起作用:
$ git pull https://github.com/-/myappsample.git master
From https://github.com/-/myappsample
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
这是一个全新的Github帐户,具有新/空回购。
有没有关于什么地方出了问题以及如何解决这个问题的想法?
谢谢