想问个关于git rebase的问题,如果在本地把 feature_branch rebase 到最新的 dev 上,再 push 到远端 feature_branch 时,就会被拒绝(因为 commit 历史对不上,多了 dev 的 commit ),所以我目前都是把本地 feature_branch 的 commit 先 push 到远端,然后在 gitlab 网页上进行 fast-forward rebase 到 dev,然后删除本地 feature_branch,最后再把 feature_branch pull 回来。
感觉这么操作比较麻烦,但又不想用 push -f,想问下有更优雅的方法吗?