Skip to content

Instantly share code, notes, and snippets.

@phortuin
phortuin / signing-git-commits.md
Last active May 23, 2025 06:16
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@sephiroth74
sephiroth74 / git_find_files
Created March 25, 2015 23:12
Git search string in all files across all commits
function git_find_files() {
if [ "$#" -ne 1 ]
then
echo "Usage: git_find_files string"
return
fi
git log -p -S$1 --pickaxe-all --full-diff
}