Skip to content

Instantly share code, notes, and snippets.

@ralphcallaway
Created November 4, 2015 00:09
Show Gist options
  • Save ralphcallaway/5c3d06c3a0a44cb7108c to your computer and use it in GitHub Desktop.
Save ralphcallaway/5c3d06c3a0a44cb7108c to your computer and use it in GitHub Desktop.
set git aliases
git config --global alias.ls 'log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate'
git config --global alias.ll 'log --pretty=format:%C(yellow)%h%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --numstat'
git config --global alias.lnc 'log --pretty=format:%h\ %s\ [%cn]'
git config --global alias.lds 'log --pretty=format:%C(yellow)%h\ %ad%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --date=short'
git config --global alias.ld 'log --pretty=format:%C(yellow)%h\ %ad%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --date=relative'
git config --global alias.le 'log --oneline --decorate'
git config --global alias.assume 'update-index --assume-unchanged'
git config --global alias.unassume 'update-index --no-assume-unchanged'
git config --global alias.assumed '!git ls-files -v | grep ^h | cut -c 3-'
git config --global alias.unassumeall '!git assumed | xargs git update-index --no-assume-unchanged'
git config --global alias.assumeall "!git st -s | awk {'print $2'} | xargs git assume"
git config --global alias.alias '! git config --get-regexp ^alias\. | sed -e s/^alias\.// -e s/\ /\ =\ /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment