title: Mass deleting local branches that has been rebased and merged
body: <p>in our team we keep the <strong>fast-forward only</strong> merge policy for master and development branches in order to prevent <em>merge commit hell</em>:</p>
  
  <p><img src="https://i.stack.imgur.com/M07oJ.gif" alt="merge commit hell"></p>
  
  <p>I do not delete my topic branches once they are merged (or rebased and then merged), so I end up with tons of these. I can delete some:</p>
  
  <pre><code>git branch --merged
  </code></pre>
  
  <p>This will only show me those which hasn't been rebased prior merge. And there are some of these, I am able to clean them up.</p>
  
  <p>I am looking for some strategy, script or hint how to deal with <em>the rebased ones</em>. There must be a script that finds all the commits from the topic branch in the master in a loop or something. Please share ;-)</p>
  
  <p>Thanks</p>