"Hey I'd like to remove these untracked files I created to test stuff!"
Source:R/clean-dir.R
exo_clean_dir.Rd
If debugging for instance created now useless untracked files and directories,
there's no need to remove them "manually".
The tool for that is git clean
:
git clean -n
for a dry run;git clean -f
to run it; Add-d
to also remove directories. See https://git-scm.com/docs/git-clean.
Examples
if (FALSE) { # interactive()
parent_path <- withr::local_tempdir()
path <- exo_clean_dir(parent_path = parent_path)
}