Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
general git config file which can speed things
[alias]
addremove = !git r && git add . --all
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
all = add . --all
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
br = branch -av
brname = !git branch | grep "^*" | awk '{ print $2 }'
brdel = branch -D
ci = commit
changes = "!f() { git log --pretty=format:'* %s' $1..$2; }; f"
churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
co = checkout
details = log -n1 -p --format=fuller
export = archive -o latest.tar.gz -9 --prefix=latest/
unstage = reset HEAD --
g = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
in = pull --dry-run
l = "!f() { git log $* | grep '^commit ' | cut -f 2 -d ' '; }; f"
out = log --branches --not --remotes
r = !git ls-files -z --deleted | xargs -0 git rm
root = rev-parse --show-toplevel
st = status
subup = submodule update --init
tags = tag -l
this = !git init && git add . && git commit -m \"Initial commit.\"
trim = !git reflog expire --expire=now --all && git gc --prune=now
[credential]
helper = osxkeychain
[color]
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 = red
[core]
autocrlf = input
compression = 9
excludesfile = ~/.gitignore_global
filemode = false
[diff]
mnemonicprefix = true
[merge]
log = true
ff = false
[push]
default = simple
[url "https://bitbucket.org/"]
insteadOf = bb:
[url "https://github.com/"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist:
[user]
name = Michael Wales
email = webmaster@michaelwales.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.