arsham
10/26/2017 - 2:30 AM

signing git commits.sh

Signing #git commits.

# Signing commits
git commit -s # sign-off
git commit -S # sign with key

# Merge and sign
git merge --no-commit
git commit -s -S

# Show the signature
git show HEAD --show-signature

# Sign all previous commits
git filter-branch --commit-filter 'git commit-tree -S "$@";' -- --all
# Or
git filter-branch -f --commit-filter 'git commit-tree -S "$@"' HEAD