worklowr facilitates reproducibility by placing the current SHA-1 of the Git
repository at the top of each HTML file. This indicates which version of the
code could be used to reproduce the results. In order for this to be
meaningful, the R Markdown file must not have changed since it was last
committed. wflow_commit
can be invoked in 3 different (though not
mutually exclusive) modes.
First, running wflow_commit
with the default arguments will identify
all R Markdown files which have been modified more recently in the Git commit
history than their corresponding HTML files. Furthermore these files must not
currently have any subsequent changes that have not been committed. The files
will be built and the correspoding HTML committed.
Second, you can have wflow_commit
first add and commit files specified
with the argument commit_files
. A message for this commit can also be
specified with the argument commit_message
. After this commit has been
made, wflow_commit
then searches the Git commit history as described
above.
Third, you can have wflow_commit
re-build and commit all the webpages
by setting all = TRUE
. This is useful if you are making an aesthetic
change, e.g. the theme, that needs to be applied regardless of whether the R
Markdown file has been edited. Only tracked files without uncommitted changes
will be re-built (this prevents the HTML not matching the corresponding R
Markdown file).