title: Shell - Remove everything except a single folder
body: <p>I have a directory containing one single folder named <code>.git</code> along side various other files and folders. I want to delete all files and all folders, except for my <code>.git</code> directory.</p>
  
  <p>Note that if any of the folders contain a subfolder named <code>.git</code>, I want to remove those as well. Only the root git repo should be preserved!</p>