Learn R Programming

ghclass (version 0.1.0)

local_repo: Local repository tools

Description

The functions provide tools for working with local git repositories, ghclass includes support for following git commands:

  • git add = local_repo_add

  • git commit = local_repo_commit

  • git push = local_repo_push

  • git pull = local_repo_pull

  • git branch = local_repo_branch

Usage

local_repo_add(repo_dir, files = ".")

local_repo_branch(repo_dir, branch)

local_repo_commit(repo_dir, message)

local_repo_pull( repo_dir, remote = "origin", branch = "master", verbose = FALSE )

local_repo_push( repo_dir, remote = "origin", branch = "master", force = FALSE, prompt = TRUE, mirror = FALSE, verbose = FALSE )

Arguments

repo_dir

Vector of repo directories or a single directory containing one or more repos.

files

Files to be staged

branch

Repository branch to use.

message

Commit message

remote

Repository remote to use.

verbose

Display verbose output.

force

Force push?

prompt

Prompt before force push?

mirror

Equivalent to --mirror

Examples

Run this code
# NOT RUN {
g = org_repos("Sta323-Sp18","hw3-")
local_repo_clone(g, "hw3")

local_repo_pull(g, "hw3")

# After Modifying hw3.Rmd
local_repo_add("hw3", "hw3.Rmd")
local_repo_commit("hw3", "Revised homework")
local_repo_push("hw3")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab