由于错误,我很少进行错误的提交。现在,我想将我的develop
分支还原为垂直的提交ID。
我尝试过
$git reset --hard 9f3df1996f435907575acafe922b22b88e6f10c4
HEAD is now at 9f3df19 Merge pull request #1 from txxxx/feature-1
这已使该提交的旧存储库转入我的本地存储库。但是当我尝试推动此操作时,它给了我一个错误。
$git push origin develop
To https://github.com/txxxxx/XXxxxx.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/txxxxx/XXxxxx.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.
我不确定现在如何将这些本地代码(来自上一次提交)推入我的develop
分支。