Skip to contents

Clones a Git repository into a new directory.

Usage

git_clone(url, path, branch = NULL)

Arguments

url

URL of the repository to clone

path

Path where to clone the repository

branch

Name of the branch to clone. Default is NULL (clones default branch).

Value

Invisibly returns TRUE if successful

Examples

if (FALSE) { # \dontrun{
git_clone("https://github.com/user/repo.git", "my_analysis")
git_clone("https://github.com/user/repo.git", "my_analysis", branch = "develop")
} # }