Git Tricks

Some git aliases I like to have handy

# Make "com" alias for "commit"
git config --global commit
# Make "co" alias for checkout
git config --global checkout
# Make "br" alias for branch
git config --global branch
# What did I commit today
git config --global "log --since=midnight --author='$(git config' --oneline"
# What did I commit yesterday
git config --global alias.yesterday "log --graph --all --since=day.before.yesterday.midnight --until=midnight --author=\"$(git config\" --oneline"
# A better log view
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"