Signing git commits with GPG on macOS for GitHub/GitLab

First, install GnuPG in order to create the keys for signing the git commits. Also install pinentry-mac which git/gpg requires later for displaying the passphrase dialog in order to decrypt your keys. brew install gnupg pinentry-mac Create a GPG key-pair: gpg --full-gen-key GPG will ask your for some more information. Use RSA/RSA (1) for the key kind, 4096 for the keysize, an expiration date for the keys, a name and email (this should be the same as the name and email you are using for your git commits). … »

How to view any Git repository file without checking it out

Here is how to have a quick look into any file in your git repository without checking it out or overwriting your working copy. git show master:path/to/file/file.xml This will show file.xml of the master branch. Git will echo the contents of the file to the standard output. So to actually save a temporary copy of the file for inspection you can just redirect the output into a new file: git show test:path/to/file/file. … »