Actually it's very easy if you use git, just 2 lines of config.
git config --global user.signingkey <your_pub_here>
git config --global commit.gpgsign true