| tar_git_status_data {gittargets} | R Documentation | 
Status of the data repository (Git)
Description
Show the Git status of the data repository.
Usage
tar_git_status_data(
  store = targets::tar_config_get("store"),
  stash_gitignore = TRUE
)
Arguments
| store | Character of length 1, path to the data store of the pipeline.
If  | 
| stash_gitignore | Logical of length 1, whether to temporarily
stash the  | 
Value
If the data repository exists, the return value is the data frame
produced by gert::git_status(repo = store). If the data store has no Git
repository, then the return value is NULL.
Stashing .gitignore
The targets package writes a .gitignore file to new data stores
in order to prevent accidental commits to the code Git repository.
Unfortunately, for gittargets, this automatic .gitignore file
interferes with proper data versioning. So by default, gittargets
temporarily stashes it to a hidden file called .gittargets_gitignore
inside the data store. If your R program crashes while the stash
is active, you can simply move it manually back to .gitignore
or run tar_git_status_data() to restore the stash automatically
if no .gitignore already exists.
See Also
Other git: 
tar_git_checkout(),
tar_git_init(),
tar_git_log(),
tar_git_ok(),
tar_git_snapshot(),
tar_git_status_code(),
tar_git_status_targets(),
tar_git_status()
Examples
if (Sys.getenv("TAR_EXAMPLES") == "true" && tar_git_ok(verbose = FALSE)) {
targets::tar_dir({ # Containing code does not modify the user's file space.
targets::tar_script(tar_target(data, 1))
targets::tar_make()
list.files("_targets", all.files = TRUE)
gert::git_init()
tar_git_init()
tar_git_status_data()
})
}