質問: git push origin masterコマンドを実行すると以下のエラーが発生しました。 ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/〇〇/〇〇.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. 次にgit fetchを試すとhintが以下に変更されました。 error: failed to push some refs to 'https://github.com/〇〇/〇〇.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. hintの内容もエラー内容もわからないので解決策がわかる方 どなたかお力をお貸しいただけますでしょうか。 宜しくお願い致します。
回答: まずCloneしてからそれに修正を加え、それをcommitし、pushしましょう。