Skip to content

Instantly share code, notes, and snippets.

@magoon
Created November 25, 2013 21:08
Show Gist options
  • Select an option

  • Save magoon/7648936 to your computer and use it in GitHub Desktop.

Select an option

Save magoon/7648936 to your computer and use it in GitHub Desktop.
Some of my gitconfigs
[color]
# Use all of the colors
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[log]
# Show remotes and branh tips in log
decorate = full
[alias]
# show branching log
tree = log --graph --decorate --pretty=oneline --abbrev-commit --all
# show pretty log
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
pretty = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
# awesome log of what files have changed
wc = whatchanged --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
# save a branch just like you would a stash
save = !sh -c 'export PREV=$(git symbolic-ref HEAD|cut -d/ -f3-) && git checkout -b "$1" && git commit -am "$1" && git checkout "$PREV"' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment