How can I better manage a git repo for github pages that uses yeoman?
With Github pages for users and organizations, everything in the root of the master branch is what gets published. I am using yeoman/grunt to build my site and do not want to push my source files there.
When using something like the
webapp generator, all of the public files are put in a
- Can I ignore build folder from master branch? - Yeoman Deployments using Git Subtree
- applying updates for authored yeoman generator to npm global install/update
- Yeoman generator - create remote github repository
- Proper practise to pulling upstream changes from generated-code
- How to fix bower ECMDERR
- Yeoman install and collaboration (over git for instance)
Is there some way that I can keep all of my source files in a
develop branch and merge the
dist folder into the
master branch and also change the path so that the files are in the root?
When looking up deployment ideas, I just stumbled across a page on the yeoman site itself that talks about this, although it’s for project pages and not user/org pages, I may have to modify it some. I will post back after I get it working.
3 Solutions collect form web for “How can I better manage a git repo for github pages that uses yeoman?”
You can use
$ git filter-branch --subdirectory-filter dist/ -f
Check the blog for How to generate github pages in a submodule
gulp-webapp has a recipe for this that works great. I switched from a user/org page to a project page to take advantage of it, and realized in doing so I didn’t actually need a user/org page at all.