git pushエラー:エラー:一部の参照を「[email protected]:xxx /xxx.git」にプッシュできませんでした

git push時のエラー:

error: failed to push some refs to '[email protected]:xxx/xxx.git'

今日、ローカルウェアハウスをリモートウェアハウスにプッシュすると、エラーが報告されました。
それでおしまい:

ここに画像の説明を挿入

または、git guiを使用すると、使用法は次のようになります。

Pushing to git@github.com:************.git
To github.com:************.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to '************.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.

 
  
  
 
いくつかの解決策を確認しましたが、どれも機能しませんでしたが、最終的githubのREADME.mdファイルがローカルコードディレクトリないことがわかりまし

私はそれをチェックしました、そしてそれは事実であることがわかりました!

今回は、ローカルライブラリに複製さgit pull --rebase origin master README.mdによって

 
  
 

その後ローカルウェアハウスにREADME.mdファイルがあることがわかります~~

 
  
  
 
それまではgit push origin master、リモートリポジトリへのアップロード操作を完了するために実行されます
ここに画像の説明を挿入

または、gitguiを使用してプッシュを実装します。

やっと:

優先:
(1):https://blog.csdn.net/qq_34842671/article/details/70916587
(2):https://blog.csdn.net/sinat_34937826/article/details/90512627

おすすめ

転載: blog.csdn.net/qq_41709378/article/details/107435985
おすすめ