Initialize a data repository (Git).Source:
Initialize a Git repository for a
targets data store.
store = targets::tar_config_get("store"),
stash_gitignore = TRUE,
git_lfs = TRUE,
verbose = TRUE
Character of length 1, path to the data store of the pipeline. If
storesetting is left unchanged in the YAML configuration file (default:
_targets.yaml). Usually, the data store lives at
storeto a custom directory to specify a path other than
_targets/. The path need not exist before the pipeline begins, and it need not end with "_targets", but it must be writeable. For optimal performance, choose a storage location with fast read/write access. If the argument
NULL, the setting is not modified. Use
tar_config_unset()to delete a setting.
Logical of length 1, whether to temporarily stash the
.gitignorefile of the data store. See the "Stashing .gitignore" section for details.
Logical, whether to automatically opt into Git LFS to track large files in
_targets/objectsmore efficiently. If
TRUEand Git LFS is installed, it should work automatically. If
FALSE, you can always opt in later by running
git lfs track objectsinside the data store.
Logical of length 1, whether to print messages to the R console.
tar_git_init() also writes a
.gitattributes file to the
store to automatically track target output date with
if it is installed on your system.
targets package writes a
.gitignore file to new data stores
in order to prevent accidental commits to the code Git repository.
gittargets, this automatic
interferes with proper data versioning. So by default,
temporarily stashes it to a hidden file called
inside the data store. If your R program crashes while the stash
is active, you can simply move it manually back to
tar_git_status_data() to restore the stash automatically
.gitignore already exists.