Learn R Programming

usethis (version 3.2.2)

use_git: Initialise a git repository

Description

use_git() initialises a Git repository and adds important files to .gitignore. If user consents, it also makes an initial commit.

Usage

use_git(message = "Initial commit")

Arguments

message

Message to use for first commit.

Details

If there is no active project and the working directory is not inside an existing project, use_git() treats the working directory as the project root and initialises the Git repository there.

See Also

Other git helpers: use_git_config(), use_git_hook(), use_git_ignore()

Examples

Run this code
if (FALSE) {
use_git()
}

Run the code above in your browser using DataLab