1
我已經推出了一個功能分支github,我意識到我想要rebase爲了壓扁一些提交。我在我的本地分行運行git rebase fixup推後被拒絕
git rebase HEAD~5
,並設置所有,但第一個和最後承諾「修正」。我保存並退出,rebase繼續保持良好狀態。當我嘗試推我得到
error: failed to push some refs to '[email protected]:username/repo.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.
有沒有辦法做到這一點沒有推-f或是我唯一的追索?有沒有更好的方法來壓縮提交?