| orderly_gitignore_update | R Documentation |
Update a gitignore, which is useful to prevent accidentally
committing files to source control that are generated. This
includes artefacts, shared resources and dependencies (within a
report directory) or at the global level all the contents of the
.outpack directory, the draft folder and the archive directory.
orderly_gitignore_update(name, root = NULL)
name |
The name of the gitignore file to update, or the string "(root)" |
root |
The path to the root directory, or |
If this function fails with a message Can't edit '.gitignore', markers are corrupted, then look for the special markers within
the .gitignore file. It should look like
# ---VVV--- added by orderly ---VVV---------------- # Don't manually edit content between these markers ... patterns # ---^^^--- added by orderly ---^^^----------------
We can't edit the file if:
any of these lines appears more than once in the file
there is anything between the first two lines
they are not in this order
If you get the error message, search and remove these lines and rerun.
Nothing, called for its side effects
path <- orderly_example()
# Update core orderly ignorables:
orderly_gitignore_update("(root)", root = path)
cli::cli_code(readLines(file.path(path, ".gitignore")))
# Report-specific ignores:
orderly_gitignore_update("data", root = path)
cli::cli_code(readLines(file.path(path, "src", "data", ".gitignore")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.