Git shortcuts for Linux based systems

Put the below code at the end of your ~/.bashrc file:

alias gs='git status'
alias ga='git add -A'
alias gc='git commit -a -m $1'
alias gp='git push origin master'
alias gpl='git pull origin master'

After saving the file, restart the command prompt. Type the alias in the command prompt to get the results:

  • Git Status:
  • Git Add:
  • Git commit:
    gc "your message"
  • Git Push:
  • Git Pull:

$1, $2, $3, etc… are command line inputs which are passed to alias.
Same way you can also use this feature in Git Push & Git Pull to treat command line inputs as sources and branches