Is it possible in git to switch to another branch without checking out all files? After switching branch I need to delete all files, regenerate them, commit and switch back. So checking out files is just a waste of times (and there are about 14000 files - it is a long operation).
To make everything clear:
I need all this to upload documentation to github.
I have repo with gh-pages branch. When I rebuild documentation locally, I copy it to repo directory, commit and push to github. But I was not happy because I had two copies of documentation locally. And I decided to creaty empty branch and after commiting switch to empty and delete files. But switching back is a long operation - so I asked this question.
I know that I can just leave on gh-pages branch and delete files, but I don't like dirty working trees )