결론: subtree를 만들어서 gh-pages
브랜치에 원하는 폴더만 올리면 된다.
- .gitignore에서 배포 원하는 폴더를 주석처리 (e.g. /public, /dist)
- 원하는 폴더를 add하고 commit한다:
git add 폴더이름 && git commit -m "Initial subtree commit"
- 서브트리로 gh-pages에 푸시 해준다:
git subtree push --prefix 폴더이름 origin gh-pages
두번째 푸시부터 안되는 분들은 아래 3번째 명령어를 써보셔요
- git add docs && git commit -m “Subtree commit”
- git subtree push –prefix docs origin
- git push origin
git subtree split --prefix docs master
:gh-pages –force
One thought on “Github Pages로 배포할 폴더 변경하기”