How do I keep the commit message when editing commits via git rebase --interactive?

前端 未结 4 2097
北海茫月
北海茫月 2021-02-05 13:11

I\'m currently in the midst of a git rebase --interactive session, where I\'m editing a commit. I\'m proceeding as suggested by How can I split up a Git commit bur

4条回答
  •  梦如初夏
    2021-02-05 13:27

    I have another answer that seems to be more fool-proof, though undocumented.

    $ git reset HEAD^
    $ git add ...               # stage the first part of your split
    $ git commit -m 'part one'
    $ git commit -a -F $(git rev-parse --git-dir)/rebase-merge/message
    

提交回复
热议问题