title: How do I squash all commits without losing submodules?
body: <p>I like the answers from <a href="https://stackoverflow.com/questions/1657017/squash-all-git-commits-into-a-single-commit">How to squash all git commits into one?</a>.</p>
  
  <p>However, I get merge conflicts if I:</p>
  
  <pre><code>git rebase --root -i
  </code></pre>
  
  <p>with pick and squash as suggested.  </p>
  
  <p>And, I lose my submodules (I have 5), when I </p>
  
  <pre><code>rm -rf .git
  git init
  git add .
  </code></pre>
  
  <p>What is the most effective way to squash all history and keep my submodules in their current directories at their current sha.</p>