Jorge Santos Gomes

View on GitHub

Verified GitHub Commits

If your commits were not configured to be signed, then they will as Unverified when Vigilant Mode is turned on.

[!CAUTION]

If this occurs on a branch such as main where others collaborate, then collaborators will be forced to re-clone the repo!

  1. Check out the branch with the unsigned commits.

  2. Review the commits that are unsigned (or not validly signed), then copy the id of the latest commit prior to the unsigned.

    git log --show-signature
    
    LAST_GOOD_COMMIT=
    

[!TIP]

If there was no good commit, set LAST_GOOD_COMMIT='--root'

  1. Run the following rebase command:

    git rebase --exec 'git commit --amend --no-edit -n -S' -i "$LAST_GOOD_COMMIT"
    
  2. Inspect the commits to confirm they are signed:

    git log --show-signature
    
  3. Forcefully push the amended commits:

    git push --force-with-lease
    

[!WARNING]

Skip if prompted to pull or fetch.