简体   繁体   中英

git rebase requires signature for each commit

I have set up git to sign my commits. However, when doing a rebase it wants to sign each and every commit from the rebase point. This includes commits that I didn't write.

Since the token I use takes about 4 seconds for each signature, and asks for my pincode as well, you can imagine this wildly slows down doing a rebase. Is there a way to convince git not to do this, while maintaining the behaviour where it signs my commits by default?

A rebase in Git consists of two main logical steps:

  1. rewinding your branch and applying the new commits from the source branch, and
  2. reapplying all your commits on top of the new base

Note carefully that in the second step Git is actually making new commits using your original commits. The reason they are actually new commits is that in general the content might change, eg from resolving merge conflicts.

As you are making new commits, if you require signing, that requirement would apply to all reapplied commits during a rebase as well. So, your options here are either to put up with the current behavior, or maybe try to turn off signing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM