Learn R Programming

git2r (version 0.10.1)

workdir: Workdir of repository

Description

Workdir of repository

Usage

workdir(repo)

## S3 method for class 'git_repository': workdir(repo)

Arguments

repo
The repository object.

Value

  • Character vector with the path of the workdir. If the repository is bare, NULL will be returned.

Examples

Run this code
## Create a directory in tempdir
path <- tempfile(pattern="git2r-")
dir.create(path)

## Initialize a repository
repo <- init(path)

## Get the path of the workdir for repository
workdir(repo)

Run the code above in your browser using DataLab