cloneGitHubRepo: Clone Github Repository

Description Usage Arguments Details Note Author(s) References See Also Examples

View source: R/cloneGitHubRepo.R

Description

cloneGitHubRepo is a wrapper around git clone and clones GitHub Repository into the repoDir directory.

Usage

1
cloneGitHubRepo(repoURL, repoDir = NULL, default = FALSE, ...)

Arguments

repoURL

The remote repository to clone.

repoDir

Local directory to clone to. If NULL, by default, creates a local directory, which corresponds to the name after last / in repoURL.

default

Sets cloned Repository as default Local and GitHub Repository. If default = TRUE then repoDir (last piece of repoURL) is set as default Local Repository and for GitHub repository also the user from repoURL is set as default GitHub user).

...

Further parameters passed to clone.

Details

To learn more about Archivist Integration With GitHub visit agithub.

Note

Bug reports and feature requests can be sent to https://github.com/MarcinKosinski/archivist.github/issues

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

References

More about archivist.github can be found on marcinkosinski.github.io/archivist.github/ and about archivist in posts' history on https://pbiecek.github.io/archivist/articles/posts.html

See Also

Other archivist.github: archive, archivist.github-package, authoriseGitHub, createGitHubRepo, deleteGitHubRepo, pushGitHubRepo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Not run: 

cloneGitHubRepo("https://github.com/MarcinKosinski/Museum")
cloneGitHubRepo("https://github.com/MarcinKosinski/Museum-Extra")


# empty Github Repository creation
authoriseGitHub(ClientID, ClientSecret) -> github_token
# authoriseGitHub also does: aoptions("github_token", github_token)
aoptions("user", user.name)
aoptions("password", user.password)

createEmptyGithubRepo("archive-test4")
setRemotebRepo(aoptions("name"), "archive-test4")
## artifact's archiving
example <- 1:100

# archiving
archive(example) -> md5hash_path

## proof that artifact is really archived
showRemoteRepo() # uses options from setGithubRepo
# let's remove przyklad
rm(example)
# and load it back from md5hash_path
aread(md5hash_path)


# clone example
unlink("archive-test", recursive = TRUE)
cloneGitHubRepo('https://github.com/MarcinKosinski/archive-test')
setRemoteRepo(aoptions("name"), "archive-test")
# equivalent is cloneGitHubRepo('https://github.com/MarcinKosinski/archive-test', default = TRUE)
# check if default is set with
# aoptions('repoDir'); aoptions('repo'); aoptions('user')
data(iris)
archive(iris)
showRemoteRepo()



## End(Not run)

archivist.github documentation built on May 2, 2019, 8:50 a.m.