GIT alias shortcuts in terminal

David Carr

1 min read - 28th May, 2017

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.

0 comments
Add a comment

Copyright © 2024 DC Blog - All rights reserved.