Files

This could go into .bashrc, .bash_profile or .zshrc - your respective shell config file.

Args

Some aliases for easier handling

# alias shortcuts
alias lla="ls -la"
alias ll="ls -l"
alias l="ls"

Then we need a function which parses the current git branch (git has to be installed)…

# Git branch in prompt.
parse_git_branch() 
{
    git branch 2> /dev/null |sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

…and input the branch unto your PS1 (current theme) like so: