Skip to content

Instantly share code, notes, and snippets.

@gaui
Last active February 10, 2019 20:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaui/a066518fab5c36fbad187aaa62537816 to your computer and use it in GitHub Desktop.
Save gaui/a066518fab5c36fbad187aaa62537816 to your computer and use it in GitHub Desktop.
.gitconfig
[user]
email = gudjonj@gmail.com
name = Guðjón Jónsson
[alias]
lg = log --decorate --graph --pretty=format:'%C(auto)%h%C(reset) -%C(auto)%d%C(reset) %s %C(dim magenta)(%cr)%C(reset) %C(dim magenta)<%an>%C(reset)' --abbrev-commit
pullc = !git pull origin $(git symbolic-ref --short HEAD)
pushc = !git push origin $(git symbolic-ref --short HEAD)
current = symbolic-ref --short HEAD
conflicts = diff --name-only --diff-filter=U
branches = for-each-ref --sort=-committerdate refs/heads/ --format='%(color:yellow)%(committerdate:short)%(color:reset) %(authorname) %(color:bold blue)%(refname:short)%(color:reset)'
stats = shortlog -s -n
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate:relative)'
which = !sh -c 'git branch | grep -v $(git symbolic-ref --short HEAD) | grep -i $0'
lucky = !sh -c 'git checkout $(git which $0 | shuf | head -n 1)'
standup = !git lg --all --since='9am yesterday'
s = status -sb
[include]
[push]
default = current
[core]
[merge]
tool = code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment