Here's an interesting experiment with using Git. Think of Github's ‘pages’ feature: I write a program in one branch (e.g. master
), and a documentation website is kept in another, entirely unrelated branch (e.g. gh-pages
).
I can generate documentation in HTML format from the code in my master
-branch, but I want to publish this as part of my documentation website in the gh-pages
branch.
How could I intelligently generate my docs from my code in master
, move it to my gh-pages
branch and commit the changes there? Should I use a post-commit hook or something? Would this be a good idea, or is it utterly foolish?