mdBook
mdBook copied to clipboard
is 'mdbook build --dest-dir=/tmp/dir1' remove '/tmp/dr1/*'
I want to use worktree in temp dir
$ git worktree add /tmp/dir1/html gh-pages
to commit the new files or modified files only
but, mdBook remove all old files and .git in /tmp/dir1/html/.git when I use:
mdbook build --dest-dir=/tmp/dir1
The recommended workflow is to generate into a separate directory and copy the files over. There is more information at https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Pages about the recommended steps.
--dest-dir doesn't know about git, and I don't think it generally should. It's purpose is to have a clean directory where it can place all output.