這個問題在這里已經有了答案:
在控制臺中顯示詳細資訊
12:48:16.974: [Project] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:master --set-upstream
error: failed to push some refs to 'https://github.com/.../...'
hint: Updates were rejected because the remote contains work that you do
To https://github.com/.../...
! refs/heads/master:refs/heads/master [rejected] (fetch first)
hint: not have locally. This is usually caused by another repository pushing
Done
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.
uj5u.com熱心網友回復:
您可以從控制臺嘗試 git push ,它要么可以正常作業,要么會告訴您確切的問題是什么以及git push --set-upstream修復它的替代命令(類似)。
PS 嘗試從任何地方(youtube/pluralsight)等學習 git 基礎知識,并嘗試盡可能多地使用命令列 我已經切換到命令列 2 年了,我對 git 的理解有了很大提高,而且它有助于避免任何麻煩的問題與作業室。
編輯- 正如相關更新所指出的,您需要git pull在推送之前提取最新的更改。
uj5u.com熱心網友回復:
在 Android Studio>Git>Branches>Remote Branches 中選擇 master 作為遠程分支
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/396246.html
