我正在尝试通过 rebase/cherry-pick 删除最后两个提交。调用后git rebase HEAD^^^ -i
,我只留下必要的提交(将所有内容都保留到HEAD^^
,所以我放弃了HEAD^
and HEAD
)。
之后git push
我看到以下内容:
! [rejected] dev -> dev (non-fast-forward)
error: failed to push some refs to 'git@bitbucket.org:XXXXXX/YYYYYYYYY.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 pull
只是快进前 HEAD 提交。所以,我结束了我开始的事情。我究竟做错了什么?