title: Why doesn't my bash prompt update?
body: <p>I'm new to git and I'm trying to add the current git branch to my already existing prompt, which is defined as follows :</p>
  
  <pre><code>RESET="\[\017\]"
  NORMAL="\[\033[0m\]"
  RED="\[\033[31;1m\]"
  YELLOW="\[\033[33;1m\]"
  WHITE="\[\033[37;1m\]"
  SMILEY="${WHITE}:)${NORMAL}"
  FROWNY="${RED}:(${NORMAL}"
  SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
  
  export PS1="${RESET}${YELLOW}\u@\h${NORMAL} \`${SELECT}\` ${YELLOW}\w $(__git_ps1) &gt;${NORMAL} "
  </code></pre>
  
  <p>I tried it (by sourcing my <code>.bashrc</code> file again) and it seemed to work, but then I went on another branch and it did not update. How can I make sure the <code>$(__git_ps1)</code> is not cached?</p>