title: Delete all local git branches
body: <p>I follow a development process where I create a new local branch for every new feature or story card. When finished I merge the branch into master and then push.</p>
  <p>What tends to happen over time due to a combination of laziness or forgetfulness, is that I end up with a large list of local branches, some of which (such as spikes) may not have been merged.</p>
  <p>I know how to list all my local branches and I know how to remove a single branch but I was wondering if there was a git command that allows me to delete all my local branches?</p>
  <p>Below is the output of the <code>git branch --merged</code> command.</p>
  <pre><code>user@machine:~/projects/application[master]$ git branch --merged
    STORY-123-Short-Description
    STORY-456-Another-Description
    STORY-789-Blah-Blah
  * master
  </code></pre>
  <p>All attempts to delete branches listed with <code>grep -v \*</code> (as per the answers below) result in errors:</p>
  <pre><code>error: branch 'STORY-123-Short-Description' not found.
  error: branch 'STORY-456-Another-Description' not found.
  error: branch 'STORY-789-Blah-Blah' not found.
  </code></pre>
  <p>I'm using:</p>
  <pre><code>git 1.7.4.1  
  ubuntu 10.04  
  GNU bash, version 4.1.5(1)-release  
  GNU grep 2.5.4  
  </code></pre>