2017-07-16 19 views
0

因此最近添加的文件位於C:\ xampp \ htdocs \ eatnow \ doc \ class_diagram \ Final。我試圖將這個文件夾內的文件推送到遠程目錄。但我收到此錯誤消息。我試圖從我的本地目錄提交文件到大學git服務器上運行的遠程目錄

$ git push -u origin master 
Enter passphrase for key '/c/Users/Girish/.ssh/id_rsa': 
To mygit.th-deg.de:kf01580/EatNow.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to '[email protected]:kf01580/EatNow.git' 
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. 

在搜索解決方案後,我嘗試從遠程存儲庫中取出,但又收到錯誤消息。

[email protected] MINGW64 /c/xampp/htdocs/eatnow (master) 
$ git pull origin doc --allow-unrelated-histories 
Enter passphrase for key '/c/Users/Girish/.ssh/id_rsa': 
From mygit.th-deg.de:kf01580/EatNow 
* branch   doc  -> FETCH_HEAD 
Already up-to-date. 

如何糾正?

回答

0

您必須拉分支master,不doc

git checkout master 
git pull origin master 

修復合併衝突(如果有的話),提交併再次按:

git push -u origin master 
相關問題