# directory does not yet exist
r <- tempfile(pattern = "gert")
git_init(r)
git_find(r)
# create a child directory, then a grandchild, then search
r_grandchild_dir <- file.path(r, "aaa", "bbb")
dir.create(r_grandchild_dir, recursive = TRUE)
git_find(r_grandchild_dir)
# cleanup
unlink(r, recursive = TRUE)
# directory exists but is empty
r <- tempfile(pattern = "gert")
dir.create(r)
git_init(r)
git_find(r)
# cleanup
unlink(r, recursive = TRUE)
Run the code above in your browser using DataLab