How to achieve `git --no-ff --ff-only` which is not allowed

前端 未结 3 1387
无人共我
无人共我 2020-12-24 07:49

As part our rebase-heavy workflow, I am hoping to use a merge on the master branch. In particular I want to merge only when the topic branch has been rebased onto the most r

3条回答
  •  眼角桃花
    2020-12-24 08:05

    git config alias.mff '!mff() { git merge --ff-only "$1" && git reset --hard HEAD@{1} && git merge --no-ff "$1"; }; mff'
    

    and from then on

    git mff other-branch
    

提交回复
热议问题