Skip to content

Instantly share code, notes, and snippets.

@jpadilla
Created November 21, 2013 21:50
Show Gist options
  • Save jpadilla/7590345 to your computer and use it in GitHub Desktop.
Save jpadilla/7590345 to your computer and use it in GitHub Desktop.
[core]
excludesfile = /Users/STUFF/.gitfiles/excludes
editor = subl -n -w
whitespace = trailing-space,space-before-tab
[apply]
whitespace = fix
[color]
interactive = true
status = true
branch = true
diff = true
ui = true
[alias]
# View the SHA, description, and history graph of the latest 20 commits
l = log --graph --pretty=format:'%Cred%h%Creset %C(cyan)%an%Creset %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
# View the current working tree status using the short format
s = status -s
# Diff
d = diff --patch-with-stat
# Pull in remote changes for the current repository and all its submodules
p = !git pull --rebase
# Commit all changes
ca = !git add . && git add -u && git commit -m
# Switch to a branch, creating it if necessary
go = checkout -B
# Undo a `git push`
undopush = push -f origin HEAD^:master
st = status
ci = commit
co = checkout
br = branch
ls = branch
# s = status
a = add
b = branch
# d = diff
dc = diff --cached
v = show
# l = log
ll = log
cp = cherry-pick
c = checkout
cc = commit
ri = rebase -i HEAD~10
sh = !git-sh
ro = !git fetch origin && git reset --hard origin/master
tree = log --graph --decorate --pretty=oneline --abbrev-commit
[user]
email = STUFF
name = STUFF
[github]
user = STUFF
token = STUFF
[format]
pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment