An awesome .gitconfig
May 25, 2023
[user]
email = MY_EMAIL_HERE
name = FIRST LAST
signingkey = A_SIGNING_KEY_GOES_HERE
[commit]
gpgsign = true
[diff]
tool = vimdiff
[merge]
tool = vimdiff
conflictstyle = diff3
[alias]
forward = !sh -c \"git switch --detach $(git rev-list --first-parent --topo-order HEAD.."$1" | tail -1)\"
The alias will let me write “git forward master” and we’ll travel down the DAG toward master, always choosing the first-parent when encountering branches.