Skip to content

Instantly share code, notes, and snippets.

@izzqz
Last active September 9, 2022 11:15
Show Gist options
  • Save izzqz/a22049555fff3eeb3e2347f100db8c38 to your computer and use it in GitHub Desktop.
Save izzqz/a22049555fff3eeb3e2347f100db8c38 to your computer and use it in GitHub Desktop.
Sign last commit in git history. And remove gpg signature from the last commit. #guide

Sign current commit in history

A bunch of my aliases

git sign - update history and sign current HEAD commit.
git unsign - update history and remove gpg signature from HEAD commit.

.gitconfig

[alias]
        sign = -c sequence.editor=: rebase --exec 'git commit --amend --no-edit -n -S' -i HEAD
        unsign = -c sequence.editor=: rebase --exec 'git commit --amend --no-edit --no-gpg-sign' -i HEAD

Created from:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment