git2r
git2r copied to clipboard
Implement git clean
I'd like to be able to remove untracked files from a repository, i.e. to run git clean -f.
It is of course trivial to use a workaround such as the one below, but are there plans to add direct support for a clean()?
# WARNING: do note this deletes untracked files
status() %>%
purrr::pluck("untracked") %>%
rlang::flatten_chr() %>%
unlink()
That sounds like a nice feature. I'd be happy to accept a PR with the git_clean functionality. Is it something you have time to work on?