View source: R/04-copy-repos.R
ghd_copy | R Documentation |
Clone all of a GitHub user's repositories to your computer, or download them all as zip files and then optionally unzip them.
ghd_copy(gh_user, dest_dir, copy_type, protocol = NULL)
gh_user |
Character string. A GitHub user name. |
dest_dir |
Character string. A local file path where the clones or zipped repositories will be downloaded to. Must be a full path. |
copy_type |
Character string. Specify whether to |
protocol |
Character string. Either |
Make sure you've got a GitHub account and have
generated a GitHub PAT
and stored it your .Renviron. If you're using protocol = "ssh"
,
you need to make sure you have
set up your SSH keys.
GitHub repositories either (a) cloned or (b) downloaded in the specified local directory.
## Not run:
ghd_copy(
gh_user = "matt-dray",
dest_dir = "~/Documents/repos-cloned",
copy_type = "clone",
protocol = "https"
)
ghd_copy(
gh_user = "matt-dray",
dest_dir = "~/Documents/repos-downloaded",
copy_type = "download"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.