Set Git options
yml-git.Rd
projr_yml_git_set
sets Git options for the project.
The options are:
commit: whether to commit changes automatically upon project builds.
add_untracked: whether to add untracked files automatically upon project builds.
push: whether to push changes automatically upon project builds.
The default is to leave all the settings unchanged.
If these settings are not setting in _projr.yml
,
then the default is to commit, add untracked files and push.
projr_yml_git_set_default
sets all Git options to default (TRUE
).
Usage
projr_yml_git_set(
all = NULL,
commit = NULL,
add_untracked = NULL,
push = NULL,
simplify_identical = TRUE,
simplify_default = TRUE,
profile = "default"
)
projr_yml_git_set_default(
profile = "default",
simplify_identical = TRUE,
simplify_default = TRUE
)
Arguments
- all
logical. Whether to set all the options to
TRUE
orFALSE
. IfNULL
, thencommit
,add_untracked
andpush
are used. Default isNULL
.- commit
logical. Whether to commit changes automatically upon project builds. If
NULL
, then setting is not changed. Default isNULL
.- add_untracked
logical. Whether to add untracked files automatically upon project builds. If
NULL
, then setting is not changed. Default isNULL
.- push
logical. Whether to push changes automatically upon project builds. If
NULL
, then setting is not changed. Default isNULL
.- simplify_identical
logical. If
TRUE
, then if all the settings are the same (forcommit
,push
andadd_untracked
), then onlygit: TRUE
orgit: FALSE
is written to_projr.yml
. Default isTRUE
.- simplify_default
logical. If
TRUE
, then if the settings are the same as the default (which is TRUE), then the settings are removed from_projr.yml
. Default isTRUE
.- profile
character. Profile to add the script to. If
"default"`` (the default), the script is added to the default profile, which is
_projr.yml. If
NULL, then the active profile is used (i.e the merge of
_projr-local.yml,
_projr-.yml and
_projr.yml) and written to
_projr.yml. If another character vector, then the corresponding profile is used and written to
_projr-.yml`.