I like to configure git
to sign my commits with GPG and use the Visual Studio Code
Insiders editor for config files and diffs.
# This is Git's per-user configuration file. | |
[user] | |
name = David Van Loon | |
email = david@vanloon.family | |
signingkey = 9668B8B5AEDFA26BB1E3E12FEBBB195D762BF472 | |
[core] | |
editor = vim | |
[diff] | |
tool = default-difftool | |
[difftool "default-difftool"] | |
cmd = code-insiders --wait --diff $LOCAL $REMOTE | |
[gpg] | |
program = C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe | |
[commit] | |
gpgsign = true | |
[alias] | |
s = status | |
d = diff | |
co = checkout | |
br = branch | |
last = log -1 HEAD | |
cane = commit --amend --no-edit | |
pr = pull --rebase | |
lo = log --oneline -n 10 | |
pop = reset HEAD~ | |
unpop = reset 'HEAD@{1}' | |
patch = format-patch -1 HEAD | |
[help] | |
autocorrect = 20 | |
[pull] | |
ff = only |
To edit your global git
configuration, run the following at the command line:
git config --global --edit
To compare two commits using the default difftool
, run the following:
git difftool <commit1> <commit2>