【发布时间】:2018-04-05 10:19:54
【问题描述】:
我现在执行这个:
git reset --hard shaCommit .
我会将我的代码收回到以前的特定提交,但是,我该如何推送呢?假设我的最后 4 次提交是垃圾,我想回到特定的提交,但是当我尝试推送时出现此错误:
$ git push
To ssh://git@uk-gitlab.almuk.corp/warlocks/capexbaar-web.git
! [rejected] development -> development (non-fast-forward)
error: failed to push some refs to 'ssh://git@uk-gitlab.almuk.corp/warlocks/capexbaar-web.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