A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://workflowr.github.io/workflowr/articles/../reference/wflow_git_push.html below:

Push files to remote repository — wflow_git_push • workflowr

wflow_git_push pushes the local files on your machine to your remote repository on a remote Git hosting service (e.g. GitHub or GitLab). This is a convenience function to run Git commands from the R console instead of the Terminal. The same functionality can be achieved by running git push in the Terminal.

wflow_git_push(
  remote = NULL,
  branch = NULL,
  username = NULL,
  password = NULL,
  force = FALSE,
  set_upstream = TRUE,
  view = getOption("workflowr.view"),
  dry_run = FALSE,
  project = "."
)
Arguments
remote

character (default: NULL). The name of the remote repository. See Details for the default behavior.

branch

character (default: NULL). The name of the branch to push to in the remote repository. If NULL, the name of the current local branch is used.

username

character (default: NULL). Username for online Git hosting service (e.g. GitHub or GitLab). The user is prompted if necessary.

password

character (default: NULL). Password for online Git hosting service (e.g. GitHub or GitLab). The user is prompted if necessary.

force

logical (default: FALSE). Force the push to the remote repository. Do not use this if you are not 100% sure of what it is doing. Equivalent to: git push -f

set_upstream

logical (default: TRUE). Set the current local branch to track the remote branch if it isn't already tracking one. This is likely what you want. Equivalent to: git push -u remote branch

view

logical (default: getOption("workflowr.view")). Open the URL to the repository in the browser. Ignored if dry_run = TRUE. Also note that this only works if the option browser is set, which you can check with getOption("browser").

dry_run

logical (default: FALSE). Preview the proposed action but do not actually push to the remote repository.

project

character (default: ".") By default the function assumes the current working directory is within the project. If this is not true, you'll need to provide the path to the project directory.

Value

An object of class wflow_git_push, which is a list with the following elements:

Details

wflow_git_push tries to choose sensible defaults if the user does not explicitly specify the remote repository and/or the remote branch:

Under the hood, wflow_git_push is a wrapper for push from the package git2r.

Examples
if (FALSE) { # \dontrun{

# Push to remote repository
wflow_git_push()
# Preview by running in dry run mode
wflow_git_push(dry_run = TRUE)
} # }


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4