-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep .git when cleaning destinationDirectory #349
base: master
Are you sure you want to change the base?
Conversation
Such change was proposed multiple times and it was declined multiple times as well on the grounds of
|
Thanks for your clarifications. I must have missed the issues that already dealt with similar suggestions (or is there a mailing-list where these discussions are happening?). |
I believe none of the past proposals have moved past message on IRC (and we, sadly, keep no logs). Keep in mind, that I have no decision-making power in this project and am just stating opinion that was prevalent a few months ago; I’d reopen this for now and see what @jaspervdj has to say on here 😊 |
Ok, l have re-opened it -- let's wait and see :-) |
I think you can use |
Keeping the .git folder in the destination directory would also allow to keep it as a submodule in the gh-pages branch of the same repo (as in https://github.com/shiftyp/submodule-gh-pages-example), therefore separating source and built files while keeping easy deployment to GitHub. I don't think that works easily with $GIT_DIR and $GIT_WORK_DIR. As for other special directories, maybe all . directories within the destination directory could be kept? |
FWIW, I use rsync as part of a post-build script, like this:
where I think if we do go ahead with keeping the |
I like the idea of keeping the built files in the same repository, but on a separate branch. By including it as a submodule, there is need to call cp or rsync in a post-build script. Adding an option to specify which directories to keep within |
When publishing a Hakyll-based site to GitHub, it is very convenient to clone the
master
/gh-pages
branch of the destination repo directly to the_site
folder.Taking my own blog as an example:
This allows to edit the sources, build the site, and publish the final pages from a single directory tree.
Unfortunately,
cabal run clean
wipes the complete_site
folder (including the.git
folder required for the above strategy to work).The suggested change keeps a potentially existing
_site/.git
folder uponclean
.Disclaimer: I am new to Hakyll/Haskell, please refactor/refine/rewrite as needed -- tia!