Created
May 5, 2014 17:30
-
-
Save ktheory/8f1f42c531ff5a58d732 to your computer and use it in GitHub Desktop.
Aaron's ~/.gitconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired by https://github.com/gabebw/dotfiles/blob/master/gitconfig.erb | |
[user] | |
name = Aaron Suggs | |
email = XXX | |
[core] | |
excludesfile = ~/.gitignore | |
[apply] | |
whitespace = nowarn | |
[diff] | |
color = auto | |
[pager] | |
color = true | |
[status] | |
color = auto | |
[alias] | |
# Save keystrokes | |
m = checkout master | |
ci = commit -a | |
ca = commit --amend | |
co = checkout | |
st = status | |
br = branch | |
b = branch | |
c = clone | |
d = diff | |
cp = cherry-pick | |
pl = pull | |
# Logging | |
l = log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an%Creset %C(cyan)%d %C(reset)%s %Cgreen(%cr)%Creset' --graph | |
lg = log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an%Creset %C(cyan)%d %C(reset)%s %Cgreen(%cr)%Creset' --stat | |
fat-snake = log --pretty=format:'' --graph | |
r = !git l -30 | |
ra = !git r --all | |
la = !git l --all | |
rom = rebase origin/master | |
# When I'm confused about changes that are staged | |
huh = diff HEAD | |
# The best way to pull | |
plr = pull --rebase | |
plre = pull --rebase | |
up = !git fetch origin && git rebase origin/master | |
ps = push | |
publish = "!f() { git push -u origin `git rev-parse --abbrev-ref head`; }; f" | |
ss = log -n 1 --format="%h" # Show short sha | |
pb = !git log -n 1 --format="%H" -z | pbcopy # Copy sha to pasteboard | |
x = !github | |
hub = !github | |
smu = !git submodule sync && git submodule update --init | |
backout = reset head^ | |
# Handy for publishing gems | |
# git release v1.0.0 | |
release = "!f() { git tag -a -m $1 $1 && git push origin tag $1; }; f" | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[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 = cyan | |
[diff] | |
# For Github-style word diffs | |
wordRegex = [^[:space:]] | |
[github] | |
user = ktheory | |
token = XXX | |
[gitflow] | |
base = master | |
release = release | |
[push] | |
default = simple | |
[branch] | |
autosetuprebase = always | |
[url "git://github.com/"] | |
# Read-only | |
insteadOf = gh: | |
[url "[email protected]:"] | |
# With write access | |
insteadOf = wgh: | |
[credential] | |
helper = osxkeychain | |
[filter "media"] | |
clean = git-media-clean %f | |
smudge = git-media-smudge %f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment