前提・実現したいこと
Github上でクローンしたファイルを編集し、それをgit pushしたい
発生している問題・エラーメッセージ
To https://github.com/~~~ ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/~~~/~~~' 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.
試したこと
ローカルでcloneしたフォルダを削除したり、追加したり、ファイルの場所を変えたりした
git config --global push先とは違うuser.nameとuser.emailを新しく設定
git init
git add .
git commit -m "~~~~~"
git remote url
git push
1度push先のusernameとパスワードを要求され、上記のようなエラーを吐かれ、それ以降同じエラー文を吐かれた
「ローカルでcloneしたフォルダを削除したり、追加したり、ファイルの場所を変えたりした」ことが問題なのかなと考えていますが、それはおかしいだろと思って方法を調べているという形です
gitはまだまだ初心者で、変なエラーを吐かれると終わる状態です。ご指導のほどよろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/18 07:10 編集