Skip to content

Instantly share code, notes, and snippets.

@jamiew
Last active June 15, 2020 20:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiew/0480ff17752bc58f3ef5f15a7868bd2f to your computer and use it in GitHub Desktop.
Save jamiew/0480ff17752bc58f3ef5f15a7868bd2f to your computer and use it in GitHub Desktop.
public pieces of my .gitconfig
[user]
name = Jamie Dubs
email = noreply@example.com
[apply]
whitespace = fix
[branch]
autosetuprebase = always
autosetupmerge = always
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status
ci = commit -m
ca = commit -a -m
co = checkout
fa = fetch --all
branches = branch -a -vv
br = branch -vv
pick = cherry-pick
amend = commit --amend
merged = branch -a --merged
graph = log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"
# `latest` is ~/bin/git-latest
# `mine` is ~/bin/git-mine
# `deletemerged` is ~/bin/git-deletedmerged
# `squash` is ~/bin/git-squash
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lg2 = log --graph --decorate --oneline
lp = log -p
d = diff -- ':!Gemfile.lock' ':!package-lock.json' ':!yarn.lock'
# Prefer HTTPS over SSH for GitHub
[url "https://github.com/"]
insteadOf = "git@github.com:"
[heroku]
account = personal
[credential]
helper = osxkeychain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment