title: Deleting all Git cached submodules from repository
body: <p>Our team is not using submodules anymore for a long time and we would like to free some repository space by deleting all cached submodules.</p>
  
  <p>Do we simply need to delete the following?</p>
  
  <pre><code>rm -rf .git/modules
  </code></pre>
  
  <p><strong>Or is there a more recommended way to do it? Also, we would like the deletion to be pushed to server if possible.</strong></p>
  
  <p>Note: Using git 2.5.4 and current state has everything merged in one branch.</p>
  
  <p>Note: We do not remember the individual names of submodules that were used in old commits.</p>