I'm trying GitHub pages with a webpack project, so I made a new branch (forgot to use --orphan
) and keep different files in them.
- On
master
branch,dist/
directory is.gitignore
d. - On
gh-pages
branch, all files are ignored except fordist/
,index.html
and some other files.
When I npm run build
on master
, the new dist/
is built, but it is overwritten by the former dist/
when I checkout gh-pages
. How to keep them and make it possible to add and commit them after?