GIT alias shortcuts in terminal

David Carr

Development

Using GIT frequently typing the full git commands every time quickly becomes tedious, thankfully terminal aliases can be created to have shortcuts to run the commands.

First, open bash profile with nano:

nano ~/.bash_profile

Next set the aliases, I’ve set my most used GIT commands to 2 letters

alias gs='git status'
alias ga='git add'
alias gp='git push'
alias gc='git commit -m '

These allow me to type gs press enter to get git status

Using the shortcuts is a huge time server.

Copyright © 2006 - 2024 DC Blog - All rights reserved.