Skip to content

Instantly share code, notes, and snippets.

@webbj74
Created April 1, 2015 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webbj74/25009f06ed36f9b11eba to your computer and use it in GitHub Desktop.
Save webbj74/25009f06ed36f9b11eba to your computer and use it in GitHub Desktop.
.gitconfig
[user]
name = Your Name
email = your.name@example.com
[core]
pager = /usr/bin/less -+$LESS -FRX
excludesfile = ~/.gitignore-global
editor = vim
[color]
ui = true
[pull]
default = simple
[push]
default = simple
[alias]
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --date=short
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --date=relative
le = log --oneline --decorate
lnc = log --pretty=format:"%h\\ %s\\ [%an]"
filelog = log -u
fl = log -u
graph = log --all --graph --decorate --oneline -n30
f = "!git ls-files | grep -i"
grep = grep -EIi
la = "!git config -l | grep alias | cut -c 7-"
# git sync assumes you have two remotes: one named upstream (the "central" repo), and one named origin (your "fork")
sync = "!f() { git checkout master && git fetch --all && git rebase upstream/master && git push -f origin master; }; f"
# Uncomment this [pager] section if you brew install git
# This will give you Github-like diff coloring
#[pager]
#log = `brew --prefix git`/share/git-core/contrib/diff-highlight/diff-highlight | /usr/bin/less -+$LESS -FRX
#diff = `brew --prefix git`/share/git-core/contrib/diff-highlight/diff-highlight | /usr/bin/less -+$LESS -FRX
#show = `brew --prefix git`/share/git-core/contrib/diff-highlight/diff-highlight | /usr/bin/less -+$LESS -FRX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment