How to use git

Signing using GPG#

To sign git commits with GPG, read the instructions on GitHub.

To test if you get an error when signing keys, run this:

echo "test" | gpg --clearsign

If you get this error:

gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device

Then run this:

export GPG_TTY=$(tty)

If you don't want to do that every time, you can add it to your .bash_profile by running sudo nano ~/.bash_profile and typing export GPG_TTY$(tty)

Updating a fork#

You can update a fork by adding an "upstream" branch along to your "origin" branch by following the GitHub tutorials.

Last updated on