[英]Git Gui I can't push to Github
我無法將我的文件推送到 Github。 錯誤:
Pushing to https://github.com/Brogolem35/project.git To https://github.com/Brogolem35/project.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/Brogolem35/project.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (eg, 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我不知道如何解決它。 我也試過 Git Bash。 它給了我同樣的問題。
你要么:
git pull ...
,嘗試合並並解決沖突(如果有),然后您將能夠git push
或git push -f ...
。 但是要小心這個,只有當你重新定位本地存儲庫並想要推送到非公共分支時才應該使用它。如果您不確定該怎么做,第一個是最安全的選擇。
請閱讀留言:
error: failed to push some refs to 'https://github.com/Brogolem35/project.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
在推送更改之前,您必須拉取遠程更改。
我有同樣的問題 。
我用了
git push origin master --force
它工作得很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.