# This is Git's per-user configuration file. [user] # Please adapt and uncomment the following lines: name = {{ .name }} email = {{ .email }} [alias] graph = log --graph --pretty=format:'%Cred%h %Creset-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(blue)<%an>%Creset' --abbrev-commit --date=relative -30 logshort = log --pretty=format:'%Cred%h %Cgreen[%cd]%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --date=short showfull = show --format=fuller --name-only # more aliases from https://stackoverflow.com/questions/2553786/how-do-i-alias-commands-in-git bv = branch -a -vv ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset%Cgreen\\ (%cd)" --decorate --numstat --date=relative ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative # Short summary of commiters summary = shortlog --summary --numbered --email # https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit # list remote branches ordered by date rr = for-each-ref --sort=-committerdate refs/remotes/ --count=20 --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' # show tracked files ls-tracked = ls-tree -r --name-only HEAD # show number of commits per author # https://stackoverflow.com/questions/9839083/git-number-of-commits-per-author-on-all-branches stats = shortlog -s -n --all --no-merges # show staged changes diffc = diff --cached -w diffw = diff -w wdiff = diff --word-diff=color --unified=1 # show stats stat = show --stat --format=fuller # from https://dzone.com/articles/lesser-known-git-commands commend = commit --amend --no-edit stashed = stash list --date=local s = status --column --show-stash ss = status -s --branch -uno co = checkout pr = remote prune origin # from pixelbeat brdate = for-each-ref --sort=-committerdate --format='%(committerdate:iso8601) %(refname:short)' refs/heads/ st = stash list --date=local alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ / d = diff -w dc = diff -w --cached [core] editor = vim [push] # default = matching default = simple # safer option, push only current branch [merge] tool = p4merge ff = false [pull] ff = only