前提
3日前までリモートにpush出来てました。
いつもと同じ手順でPR作成しようとすると、rejectedのエラーになりpushできずにいます。
エラーメッセージ
xxx@mac % git push origin xxxbranch To https://github.com/Hoge-Inc/room.git ! [rejected] xxxbranch(non-fast-forward) error: failed to push some refs to 'https://github.com/Hoge-Inc/room.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.
該当のソースコード
git add . git commit -m "コメント" git fetch git rebase origin/develop git push origin feature/xxxbranch
試したこと
git fetchやgit mergeしてもエラーメッセージ変わりませんでした。
xxx@mac % git fetch xxx@mac % git rebase origin/develop Current branch xxxbranch is up to date. この後PRするとエラー
xxx@mac % git fetch xxx@mac % git merge origin/develop Already up to date. この後PRするとエラー
そこで、別ディレクトリにプロジェクトをgit cloneし直して、
リモート先のブランチをローカルにcheckout、
それをpushしてみました。
それも同じエラーになりました。
xxx@mac spacee % git clone https://github.com/Hoge-Inc/room.git Cloning into 'xxx'... xxx@mac % git checkout -b xxxbranch origin/xxxbranch git add . git commit -m "コメント" git push origin feature/xxxbranch この後エラー
何か試すと良い事や確認すべき事あれば教えていただけると幸いです。
宜しくお願い致します。

0 コメント