Skip to content

Instantly share code, notes, and snippets.

@schwarzmx
Created July 31, 2014 21:15
Show Gist options
  • Save schwarzmx/06349fa48457dae3f854 to your computer and use it in GitHub Desktop.
Save schwarzmx/06349fa48457dae3f854 to your computer and use it in GitHub Desktop.
[color]
ui = always
[user]
name = Fernando Hernandez
email = fernando@clarkparsia.com
[alias]
# most used
ci = commit
co = checkout
st = status
# aliases for diffs
diffcs = diff --cached --stat
diffs = diff --stat
diffc = diff --cached
# grep with perl extensions and pretty print
g = grep --break --heading --line-number
# grep in certain file patterns
# example: git gfiles aVariable .java
gfiles ="!f() { git ls-files | grep $2 | sed s/[0-9]*:// | xargs git g $1 -- ; }; f"
# log with graph
logg = log --graph --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# pretty printed log
lg = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
# print the log as a graph
lgg = log --graph --pretty=oneline --abbrev-commit
# pull and rebase
purr = pull --rebase
# rebase interactive
rint = rebase -i
# list the changed files of the given commit ID
lsch = diff-tree --no-commit-id --name-only -r
[grep]
lineNumber = true
[push]
default = simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment