我正尝试硬重置master分支,因此它反映了我们“ develop”分支的当前状态。
我们不关心master上的任何旧提交,并希望重写其历史记录。 我应该注意,我们使用的是自托管的Git服务器,名为“ SCM-Manager ”(没有GitHub或类似服务)。我在存储库中确实拥有“所有者”特权。
我正在使用以下命令将Develop的状态强制推为Master:
git push origin +develop:master --no-verify --force
但我不断收到此错误消息:
! [rejected] develop -> master (non-fast-forward)
error: failed to push some refs to 'https://****.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.
我们非常感谢您的帮助。