git pushエラー:ヒント:現在のブランチの先端が遅れているため、更新が拒否されました



Git Push Error Hint



あなたとあなたの同僚が一緒にgitプロジェクトを開発するとき

独自のコードを送信する前に更新してください

git pull

促す



From: ...... error: your local changes to the following files would overwritten by merge: your modified file path Please commit your changes or stash them before you merge Aborting

誰かがあなたの前にコードを提出しました

git add . git commit -m 'This is the remark information submitted once'

送信を続行すると、エラーが報告されます



git push To ...... ![rejected] ..... error:failed to push some refs to '.....' hint:Updates were rejected because the tip of your current branch is behind hint:its remote counterpart... hint:'git pull ...'before pushing again hint:See ...

プロンプトに従って、更新します

git pull

ウィンドウがポップアップします
画像
手順は次のとおりです。

  1. iを押して挿入モードに入ります
  2. 黄色のフォントで行を変更し、提出のコメントを記入します 'これは提出のコメントでもあります'
  3. それを押す
  4. タイプ:wq
  5. キャリッジリターン

通常、他の人からローカルに送信されたコードを更新できます。



git status . on branch dev your branch is ahead of 'orign/dev' by 2 commits (use 'git push' to publish your local commits)

この時点でもう一度押します

git push

gitプロジェクトを入力して送信情報の履歴を表示すると、次の2つのレコードが表示されます。

  • 「これは発言の提出です」パイプライン 合格しなかった
  • 「これは一度に送信されるコメント情報です」パイプライン 合格しました

問題が解決しました。