git出開始错误ヒント:リモートにあなたが行う作業が含まれているため、更新は拒否されました

問題の説明

git push次の問題が発生した場合

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 pull、特定のプロセスは次の手順です。

$ git pull origin master
$ git push origin master

 
現時点ではgit pull、次の状況が発生する可能性があります。

ここに画像の説明を挿入
 

無視してかまいませんが(すぐ下の手順3と4)、説明を入力する場合は、次のものが必要です。

  1. キーボードの文字iを押して、挿入モードに入ります

  2. 黄色のマージ情報の一番上の行を変更します。変更する必要はありません

  3. キーボードの左上隅にある「Esc」を押します

  4. 「:wq」と入力し、colon + wqに注意して、Enterキーを押します。

おすすめ

転載: blog.csdn.net/weixin_43901865/article/details/112792857