How to retain commit gpg-signature after interactive rebase squashing?

后端 未结 3 1291
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 00:52

When I want to squash some commits by interactive rebase:

git rebase -i HEAD~3

And then:

pick cbd03e3 Final co         


        
3条回答
  •  我在风中等你
    2020-12-08 01:12

    Like Cupcake stated, you can't retain the old signature from the unsquashed commits, but you can sign the new squashed commit if you rebase like this:

    git rebase --interactive --gpg-sign=myemail@example.com HEAD~4

    Adding --gpg-sign=myemail@example.com as an argument will sign the final squashed commit.

提交回复
热议问题