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 :
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 "auto geenrated commit"
git push origin master
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).