在服務器中我創建了存儲庫。 在家裏的電腦,我拉。 現在我做了我的更改,他們正在努力, 我需要推送到服務器。 Git拒絕推動。 如何更新服務器中的文件?如何在服務器上推git
$ git push
To ssh://[email protected]/~/erkin
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/~/erkin'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again.
See the 'Note about fast-forwards' section of 'git push --help' for details.
您是否創建了裸倉庫?發佈一些細節,你會得到什麼錯誤信息? – CharlesB 2011-06-08 18:08:34
git可以因各種原因拒絕推送。 'git push'命令的輸出可以幫助我們找出問題所在。 – vhallac 2011-06-08 18:11:54
說「Git拒絕推送」這個無生命的軟件將自由度和惡意接近於惡意。要麼你的電腦被佔有,要麼說它不是「不!我不會!」當你試圖做到這一點。如果後者知道它說的是我們唯一的機會來幫助你。 – 2011-06-08 19:36:12