Learn R Programming

usethis (version 3.1.0)

use_git_config: Configure Git

Description

Sets Git options, for either the user or the project ("global" or "local", in Git terminology). Wraps gert::git_config_set() and gert::git_config_global_set(). To inspect Git config, see gert::git_config().

Usage

use_git_config(scope = c("user", "project"), ...)

Value

Invisibly, the previous values of the modified components, as a named list.

Arguments

scope

Edit globally for the current user, or locally for the current project

...

Name-value pairs, processed as <dynamic-dots>.

See Also

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

Examples

Run this code
if (FALSE) {
# set the user's global user.name and user.email
use_git_config(user.name = "Jane", user.email = "jane@example.org")

# set the user.name and user.email locally, i.e. for current repo/project
use_git_config(
  scope = "project",
  user.name = "Jane",
  user.email = "jane@example.org"
)
}

Run the code above in your browser using DataLab