Skip to content

Instantly share code, notes, and snippets.

@LeeFlannery
Last active October 21, 2021 19:15
Show Gist options
  • Save LeeFlannery/4383ae5e75d1302957546d4f4fb3e648 to your computer and use it in GitHub Desktop.
Save LeeFlannery/4383ae5e75d1302957546d4f4fb3e648 to your computer and use it in GitHub Desktop.
.gitconfig ... 2021 version - same as last year. If it ain't broke ...
[user]
name = Lee Flannery
email = lflannery@example.com
# A history alias I've always liked
[alias]
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
[core]
autocrlf = input
editor = code --wait
trustctime = false
# Using VS Code as diff and mergetool
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
prompt = false
trustExitCode = false
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
keepBackup = false
trustExitCode = true
# Only push the current branch
[push]
default = simple
# Delete references to branches no longer on the remote when fetching
# (e.g. they were merged into develop and deleted on the remote)
# Note - not the same as "git prune"
# See https://www.atlassian.com/git/tutorials/git-prune
[fetch]
prune = true
# Color schemas I like
# See https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config
# true => color even when piped. auto => only in interactive shell
[color]
ui = true
branch = auto
diff = auto
status = auto
# default colors are all green
[color "branch"]
current = white bold
local = cyan
remote = normal
# friendlier than default colors
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
# friendlier than default colors
[color "status"]
added = yellow
changed = green
untracked = cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment