2012-06-07 80 views
0

我按照github set up上的指示。一切都很順利,直到我得到「git push origin master」。不能拉上github

當我輸入,在我得到了錯誤信息:

**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.* 

於是我在「混帳拉」類型的,並且得到了錯誤:

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

不是100%確定,因爲我沒有在幾個月內使用GIT,但對於拉,嘗試'GIT拉起源大師'。此外,'git fetch'會將遠程回購下拉到您的機器上,以便您可以在本地同步它。 –

回答

2

umm。 git回購和你的回購是不同的,沒有共同之處。這就是它失敗的原因。我建議你從第一個重做github的東西和克隆,看看你得到了什麼。