Git is an indispensable tool for developers, but typing out the same long commands repeatedly can get tiresome. Thankfully, Git provides a simple solution: aliases for your most frequently used commands!

For example, instead of typing git branch or git commit every time, you can create shorter versions like git br and git cm. Here’s how you can set them up directly from your terminal:

git config --global alias.br branch
git config --global alias.cm commit

Now, instead of typing the full commands, you can simply use git br and git cm. This works by adding these aliases to your global Git configuration file (~/.gitconfig). You can view all your aliases by opening this file.