Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Created November 21, 2014 20:58
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 typeoneerror/b47c9ba37184defedb3f to your computer and use it in GitHub Desktop.
Save typeoneerror/b47c9ba37184defedb3f to your computer and use it in GitHub Desktop.
.gitconfig
[alias]
st = status
nl = log --oneline
br = branch
co = checkout
ds = diff --staged
di = diff
fetchall = fetch -v --all
logf = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
logm = log --author=USERNAME --pretty=format:'%h %cd %s' --date=short
logn = log --graph --decorate --pretty=oneline --abbrev-commit
panic = !tar cvf ../git_panic.tar *
diffw = diff --word-diff=plain
diffl = diff --ignore-space-at-eol
diffm = diff --diff-filter=M
gh = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/tree/$(git rev-parse --abbrev-ref HEAD)\""
pr = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pull/new/$(git rev-parse --abbrev-ref HEAD)\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment