in_repository | R Documentation |
The lookup start from path and walk across parent directories if nothing has been found.
in_repository(path = ".")
path |
The path to the directory. |
TRUE if directory is in a git repository else FALSE
## Not run:
## Initialize a temporary repository
path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- init(path)
## Create a user
config(repo, user.name = "Alice", user.email = "alice@example.org")
## Check if path is in a git repository
in_repository(path)
## Check if working directory is in a git repository
setwd(path)
in_repository()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.