# local user config, usernames, etc
[include]
    path=~/.gitconfig.local
[color]
    diff = auto
    status = auto
    branch = auto
    interactive = auto
    ui = auto
[help]
	# Automatically correct and execute mistyped commands.
	autocorrect = 1
[branch]
	# Show most recently changed branches first.
	sort = -committerdate
[push]
	default = simple
	autoSetupRemote = true
[diff]
    tool = default-difftool
[difftool "default-difftool"]
    cmd = code --wait --diff $LOCAL $REMOTE
[filter "media"]
	clean = git media clean %f
	smudge = git media smudge %f
	required = true
[alias]
    # Shorten some often used commands
    b = branch
    c = commit
    sw = switch
    swm = switch master
    co = checkout
    com = checkout master
    ss = status
    s = status -s
    ds = diff --staged
    amend = commit --amend -c HEAD
    oops = reset --soft HEAD~1
    kris = pull --rebase
    ignore = !git update-index --assume-unchanged
    unignore = !git update-index --no-assume-unchanged
    ignored = !git ls-files -v | grep "^[[:lower:]]"
    undo = reset --soft HEAD^
    squash = rebase --autostash -i
    megasquash = "!f() { git rebase --autostash -i `git merge-base --fork-point HEAD master`; }; f"
    unstage = restore --staged

    # various pretty loggers from various places
    l = log --pretty=oneline --abbrev-commit
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
    lgg = log --graph --pretty=format:'%Creset %s' --abbrev-commit
    lc = log ORIG_HEAD.. --stat --no-merges
    # from http://blog.kfish.org/2010/04/git-lola.html
    lol = log --graph --decorate --pretty=oneline --abbrev-commit
    lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
    ll = log --graph --date=short

    # List contributors with number of commits.
	contributors = shortlog --summary --numbered

    # Show the user email for the current repository.
	whoami = config user.email
