Skip to content

Instantly share code, notes, and snippets.

@bjgill
Last active March 5, 2023 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bjgill/6b440841c4fdb3fec056f45cc50038dc to your computer and use it in GitHub Desktop.
Save bjgill/6b440841c4fdb3fec056f45cc50038dc to your computer and use it in GitHub Desktop.
My ~/.gitconfig
[user]
email = git@bgill.eu
name = Benjamin Gill
signingkey = C3EAA99A1E587915
[push]
default = simple
[pull]
ff = only
[alias]
# Aliases for laziness - fewer characters
cmt = commit
co = checkout
mrg = merge
# Often, the last log is the only relevant one.
last = log -1 HEAD
# More condensed and prettier than plain log.
lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ci)%C(reset) %C(white)%s%C(reset) %C(dim red)- %an%C(reset)%C(bold yellow)%d%C(reset)'
# A slighly safer force push
please = push --force-with-lease
# Show files that failed to merge
failed = diff --name-status --diff-filter=U
# Removes excessive verbiage from status, but not too much.
st = status -bs
# Useful shortcut for backing out a botched merge.
unstage = reset HEAD --
[core]
editor = vim
# Ensure that all commits(/merges/etc.) are GPG signed.
[commit]
gpgSign = true
[push]
gpgSign = if-asked
[tag]
forceSignAnnotated = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment