Copy and paste the code below into your .bash_profile or .zshrc if you use zsh
# stage and commit files
alias gac="git add . & git commit"
# git push
alias gp="git push"
# checkout branch
alias gcb ="git checkout"
# create new branch
alias gcb="git checkout -b"
# git push new branch to remote
alias gpn="git push -u origin"Run nano ~/.bash_profile or nano ~/.zshrc based on the commandline you are using.
You can replace nano with vim or vi if that's your preference.