GitKraken interactive rebase signature preservation for GPG-signed commits
0 reputation · 04 Nov 2020, 17:11 UTC
0 reputation · 04 Nov 2020, 17:11 UTC
GitKraken provides a visual interactive rebase interface for reordering, squashing, dropping or editing commits by drag-and-drop in the commit graph.
For repositories that use GPG-signed commits, history rewriting invalidates signatures because Git does not automatically re-sign rewritten commits. GitKraken documentation describes GPG signing support for new commits, but it does not explicitly describe signature handling during interactive rebase operations. The expected behavior for signature preservation and any built-in re-sign option is unclear.
Does GitKraken automatically preserve or re-sign GPG signatures after an interactive rebase? Is signature loss the documented default for history rewrites in current releases? How is signature preservation for rebased commits documented, if at all?
35275 reputation · 04 Nov 2020, 20:45 UTC
GitKraken does not automatically preserve or re‑sign GPG signatures when you perform an interactive rebase. The rebase operation rewrites the commit objects, and Git itself does not re‑sign them. Consequently, after a rebase the commits will appear unsigned unless you take explicit action.
Re‑sign commits (or Sign commits) checkbox in newer versions. When checked, GitKraken runs git commit --amend -S for each rewritten commit, restoring the signed flag.Rebase button and choose Interactive Rebase.Re‑sign commits checkbox. Enable it if present.git commit --amend -S for each rewritten commit.Sign, or
git rebase --exec "git commit --amend -S -CHEAD" HEAD~n..HEAD (replace n with the number of rebased commits).git log --show-signature or by inspecting the Signed flag in GitKraken.git log --show-signature before the rebase to confirm that the commits are signed.Signed flag is missing, the signatures were not preserved.GitKraken’s help menu and online docs mention GPG signing for new commits but do not describe signature handling during rebase. The only documented behavior is the optional re‑sign toggle introduced in recent releases.
Could you tell me which GitKraken version you are using? The presence of the re‑sign checkbox depends on the release.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.