If you want to have a nice informative prompt in your bash shell then add the following to your ~/.bash_profile. We’ll also add a few lines to increase your shell history size and add date/timestamps to it

# setup git completion and prompt to show your current directory, branch and status
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='[\[email protected] \w$(__git_ps1)]\$ '

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=5000
HISTFILESIZE=5000
HISTTIMEFORMAT="%F %T"

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>