Setting aliases

Aliases help us to remember how to repeat doing complex git things, like fancy logging. But also, you can alias long function names like checkout.

To set an alias, make a git config file in your home directory.

Here’s my vi ~/.gitconfig aliases

$ cat .gitconfig 
[alias]
  co = checkout
  st = status
  stat = status
  br = branch
  fancy-log = log --oneline --decorate --all --graph

Setting via command-line

git config --global alias.co checkout


Last but not least, we can read about cleaning and pruning our git repository