Run sh ./install.sh
to install all.
Shorthand for git checkout
git config --global alias.co checkout
Shorthand for git branch
git config --global alias.br branch
Shorthand for git reset --hard
git config --global alias.undo 'reset --hard'
Show a nicely formatted summary of an object
git config --global alias.info 'show --stat --pretty=format:'"'"'%C(yellow)%H%Cblue%d%n%Creset%B%Cgreen%cr %C(cyan)by %Cred%an <%ae>%Creset%n%C(yellow)PGP: %C(bold)[%G?] %GS%Creset%n'"'"''
git log
with a tree graph
git config --global alias.lg 'log --graph --date-order --pretty=format:'"'"'%C(yellow)%h %C(bold)%G?%Creset %s%Cblue%d%Creset'"'"''
git log
with a detailed oneline summary
git config --global alias.ll 'log --date-order --pretty=format:'"'"'%C(yellow)%h %C(bold)%G? %Creset%C(cyan)[%Cgreen%ad%C(cyan) by %Cred%an%C(cyan)]%Creset %s%Cblue%d%Creset'"'"' --date=format:'"'"'%e %b %Y %H:%M'"'"''
Show a list of changed files
git config --global alias.changes 'diff --name-status -r'
Show file change stats
git config --global alias.stat 'diff --stat -r'
Squash commits
git config --global alias.squash '!f() { [ $# -gt 0 ] || { false; exit; }; git reset --soft "$1" && { shift; git commit "$@"; }; }; f'
Show current commit
git config --global alias.head 'log -n 1 HEAD --date-order --pretty=format:'"'"'%C(yellow)%h %C(bold)%G? %Creset%C(cyan)[%Cgreen%ad%C(cyan) by %Cred%an%C(cyan)]%Creset %s%Cblue%d%Creset'"'"' --date=format:'"'"'%e %b %Y %H:%M'"'"''
Show GPG signature for current commit
git config --global alias.gpginfo 'show --pretty=format:'"'"'%C(yellow)%H%Creset%n%GG'"'"''
Amend previous commit
git config --global alias.amend 'commit --amend'
Push to origin
git config --global alias.pushup '!git push -u origin $(git rev-parse --abbrev-ref HEAD)'