Must have GIT aliases header image

Must have GIT aliases

Less is more

Posted on 27th of March 2023 by Victor Dieppa Garriga

Git is the most popular software for version control on the planet. Every day, millions of developers use it, sending hundreds of commands.

Are you not tired of typing long commands to do things as simple as checking out ‘master’?

The solution, Aliases, here is my list of “must have” aliases for GIT:

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
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"
git config --global alias.se '!git rev-list --all | xargs git grep -F'
git config --global alias.gl 'config --global -l'