Simple Git Client for R

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status AppVeyor Build Status CRAN_Status_Badge

Simple git client based on ‘libgit2’ with user-friendly authentication and support for both SSH and HTTPS remotes on all platforms. User credentials are shared with command line ‘git’ through the git-credential store and ssh keys stored on disk or ssh-agent. On Linux, a somewhat recent version of ‘libgit2’ is required.

Gert is still in early development with limited documentation. Have a look at the slides.

Installation

Get the latest version from CRAN:

Or install the development version:

remotes::install_github("r-lib/gert")

On Linux you need to install libgit2:

For Ubuntu Trusty and Xenial, you can use libgit2 backports from this ppa:

sudo add-apt-repository ppa:cran/libgit2
sudo apt-get update
sudo apt-get install libgit2-dev

It is still possible to install the package with older versions of libgit2 (e.g. on CentOS) however these do not support authentication over ssh/https remotes. Offline functionality should work fine.

Example

This is a basic example:

library(gert)
path <- file.path(tempdir(), "gert")
repo <- git_clone("https://github.com/r-lib/gert", path)
print(repo)