1 - install GPG tools : https://gpgtools.org/
2 - Create new key for your github email
3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY
4 - configure git to sign all commits: git config --global commit.gpgsign true
5 - add to the bottom of ~/.gnupg/gpg.conf
: (create the file if it not exists)
no-tty
use-agent
6 - Add key to you're github profile settings: gpg --armor --export YOURKEY
To make it not so github specific you should publish your key to a keyserver https://www.gnupg.org/gph/en/manual/x457.html