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 swit
say you want to be in branch A, but with the files from branch B
find the current commit ref of branch A with git log, e.g. "99ce9a2",
git checkout A
git reset --hard B
git reset 99ce9a2
you should now be on branch A, with a folder structure corresponding to B, which show up as unstaged changes (A history has not changed).