我在GitHub上創建了一個Git存儲庫,也創建了本地存儲庫。首先,我將遠程存儲庫放入本地存儲庫。然後,我添加了一個文件,上演文件,提交它,現在我再次嘗試做推到遠程存儲庫,但它失敗,此消息:使用Git for Windows推送到GitHub時出錯
Pushing to https://github.com/jjenkov/java-utils To https://github.com/jjenkov/java-utils ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/jjenkov/java-utils' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我完全新的Git和Github上,所以也許我做錯了什麼。雖然遠程倉庫應該是空的(除了由GitHub生成的自述文件),我已經將遠程倉庫「提取」到本地倉庫。
有誰知道問題是什麼,或者我可以在哪裏閱讀解決方案?
後三個命令相當於'pull --rebase'。 – 2013-02-15 19:41:44