My list of aliases on Mac

Since I have jumped into using git for source control management, I found the bash aliases a very useful thing.

On OS X just run nano ~/.profile to edit your list, you can find mine below:


alias ..="cd .."
alias gps="git push"
alias gpl="git pull"
alias gcom="git commit -a -m"
alias gcd="git checkout"
alias gs="git status"
alias gm="git merge"
alias grem="gir remote -v"
alias killDS="find . -name *.DS_Store -type f -delete"
alias ll="ls -l"

# Git branch in prompt.

parse_git_branch() {

    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'

}

export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "

After saving don’t forget to reload the aliases by source ~/.profile

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.