問題の説明
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)、説明を入力する場合は、次のものが必要です。
-
キーボードの文字iを押して、挿入モードに入ります
-
黄色のマージ情報の一番上の行を変更します。変更する必要はありません
-
キーボードの左上隅にある「Esc」を押します
-
「:wq」と入力し、colon + wqに注意して、Enterキーを押します。