g8l2va
Last Updated: February 25, 2016
·
806
· theatlasroom
091274f16cac5a60d378d0623bf6ae45

Some handy (for me) bash aliases

Bash aliases are super handy for some of those commands you use on a regular basis.
Here are a few of my bash aliases that I find useful:

# git add all
alias gadda='git add .'
# switch to the dev root folder
alias devroot='cd #INSERT YOUR ROOT FOLDER PATH'
# ghost in the shell - git status
alias gits='git status'
# git diff
alias giff='git diff'
# git branches --verbose
alias gbv='git branch -v'
# create and checkout a new branch, takes the branch name as a arg
gcb_args(){
    for branch_name in "$@"
    do
        git checkout -b "$branch_name"
    done
} 
alias gcb=gcb_args  
# shows a pretty log
alias glog='git log --graph --oneline --all'
# git commit -am, takes a message as an argument
gcam_args(){
    for msg in "$@"
    do
        git commit -am "$msg"
    done
} 
alias gcam=gcam_args
Say Thanks
Respond
Filed Under