GIT alias shortcuts in terminal

David Carr

GIT alias shortcuts in terminal

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.

Laravel Modules Book by David Carr

Help support the blog so that I can continue creating new content!

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.