我按照github set up上的说明操作。一切都很顺利,直到我得到“git push origin master”。
当我输入时,我收到了错误消息:
**To https://github.com/anc1revv/Dash-Website.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/anc1revv/Dash-Website.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.*
然后我输入“git pull”并收到错误:
warning: no common commits
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/anc1revv/Dash-Website
* [new branch] master -> origin/master
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "master"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details."
有什么建议吗?
答案 0 :(得分:2)
UMM。 git repo和你的回购是不同的,没有任何共同之处。这就是失败的原因。我建议你首先重做github的东西和CLONE,看看你得到了什么。