###前提・実現したいこと
GitHubを用いてウェブサービスを開発しています。作業の過程でローカルのレポジトリを一度削除し、再度新しく作ったディレクトリをレポジトリとしてgit initしました。その結果、git fetchをしても以前作ったリモートブランチにコミットした変更内容をプッシュすることができません。また、特に以前そのリモートブランチから作成したpull requestも全てcloseしてしまいました。どうすれば以前のリモートブランチに変更内容をプッシュすることができ、さらにpull requestをreopenすることができるでしょうか。
ご回答よろしくお願いします。
###発生している問題・エラーメッセージ
以下ローカルのmasterから以前に作成したリモートブランチresolve1へpushする際に出るエラーです。
また、以前のpull requestをreopenしようとしてもできず、the resolve1 branch has no history in common with masterというエラーメッセージが出ます。
master -> resolve1 (non-fast-forward) error: failed to push some refs to 'https://github.com/.......' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and 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 fetchからのgit merge origin/masterなどを試してみましたが、うまくいきませんでした。
あなたの回答
tips
プレビュー