gitのpushがrejectされた
pushしたらなんかエラーが出てpushできない
$ git push origin [remote branch] ! [rejected] [branch] -> [remote branch] (non-fast-forward) error: failed to push some refs to 'git@reposicoty.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
色々調べたけど解決しないし時間ないからbranchもういっこ切ってそっちにmergeしてからpushしたんだけど、うっかりそのままbranch切ったら
$ git branch [branch2] warning: refname '[branch]' is ambiguous. fatal: Ambiguous object name: '[branch]'.
じゃなくて
$ git checkout master $ git branch [branch2] $ git merge [branch] $ git push origin [remote branch]
これで解決した