はじめに
gitにpushできなくなったというトラブルの対処
1 2 3 4 5 6 7 8 |
# git push origin abc To git@git.xxx.com:oooo/xxxx-ooo.git ! [rejected] xxx -> xxx (non-fast-forward) error: failed to push some refs to 'git@git.xxx.com:oooo/xxxx-ooo.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. |
というエラーが発生。
原因
リモートリポジトリと、ローカルリポジトリに差分があることにより発生する。
対処
1 2 |
git push origin :branch git push origin branch |
remoteブランチを削除することになる。