I happened to come across Linux Tips: take control of your bash_history. This explains that setting "export HISTCONTROL=ignoreboth" causes Bash not to store duplicate commands in history. For example, if you are checking "ps" waiting for some process to end:
ps -e | grep foo
and keep pressing up arrow every few seconds to repeat it, you'll end up with a long list of those in your history if this isn't set. If it is set, you get only the last.
Actually there's much more to this than that little post exlained.