title: How to git push current folder as new commit, without pulling old files
body: <p>I have a git repo that I am autogenerating. I want to push these autogenerated files to a remote git repo, however, I dont want to keep the files. Currently I am doing the fallowing :</p>
  <pre><code>git clone git@server:repo
  rm -r *     # this does not remove .git, so history will stay
  #code for auto generation here
  git add.
  git commit -m &quot;auto geenrated commit&quot;
  git push origin master
  </code></pre>
  <p>As you can see I only need .git folder, Is there a way to pull only .git folder, Or better, is there a way to push current folder to a repo as a new commit ?
  To be clear, I dont want to remove or edit history (because I am using this auto generated files as a submodule in another project, so certain commits needs to stay).</p>