0

我按照github setup 上的说明进行操作。一切都很顺利,直到我进入“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."

有什么建议么??

4

1 回答 1

2

嗯。git repo 和你的 repo 是不同的,没有任何共同点。这就是它失败的原因。我建议你先重做 github 的东西和 CLONE,看看你得到了什么。

于 2012-06-07T20:26:15.700 回答