discover: Discover repository from path. Default is TRUE.
Returns
A git_repository object with entries:
path: Path to a git repository
Examples
## Not run:## Initialize a temporary repositorypath <- tempfile(pattern="git2r-")dir.create(path)repo <- init(path)# Configure a userconfig(repo, user.name ="Alice", user.email ="alice@example.org")## Create a file, add and commitwriteLines("Hello world!", file.path(path,"test-1.txt"))add(repo,'test-1.txt')commit_1 <- commit(repo,"Commit message")## Make one more commitwriteLines(c("Hello world!","HELLO WORLD!"), file.path(path,"test-1.txt"))add(repo,'test-1.txt')commit(repo,"Next commit message")## Create one more filewriteLines("Hello world!", file.path(path,"test-2.txt"))## Brief summary of repositoryrepo
## Summary of repositorysummary(repo)## Workdir of repositoryworkdir(repo)## Check if repository is bareis_bare(repo)## Check if repository is emptyis_empty(repo)## Check if repository is a shallow cloneis_shallow(repo)## List all references in repositoryreferences(repo)## List all branches in repositorybranches(repo)## Get HEAD of repositoryrepository_head(repo)## Check if HEAD is headis_head(repository_head(repo))## Check if HEAD is localis_local(repository_head(repo))## List all tags in repositorytags(repo)## End(Not run)