Enhance Git productivity with Aliases

Yash Bhandare
TechVerito
Published in
1 min readDec 13, 2023

In the fast-paced world of software development, efficiency is the key. One area where developers can significantly enhance their productivity is through the use of shortcuts and aliases for Git commands.

Git productivity

Git, a distributed version control system, is an integral part of the development process, and mastering its commands can streamline your workflow. In this blog, we’ll explore the power of creating custom shortcuts and aliases to save time and effort.

I’m sharing the list of “aliases” that I have configured in “.zshrc” file. You can paste following lines in your rc file (.zshrc, .bashrc or .profile):

alias gpl='git pull'
alias gph='git push'
alias gst='git status'
alias gb='git branch'
alias gco='git checkout'
alias gcb='git checkout -b'
alias gd='git diff'
alias ga='git add'
alias gcm='git commit -m'
alias glg="git log"

Now, you just have to type gpl instead of git pull & same applies to other git commands.

These are some basic git commands that we need frequently. You can customise the shortcuts as per your convenience and also add more to the above list.

Being an XP practitioner, I find this very helpful as it enhances productivity during Pair-Programming.

Please feel free to comment your customisations too!

--

--