GitHub

General GitHub and Git Information

Collaborate with GitHub Organizations

A GitHub organization allows a team (or an individual like me) to collaborate on related repositories. The organization owner(s) manage member(s) and repositories (repos). Each repo can be public or private, and members can have one of 5 permission levels with increasing level of control/danger: read, triage, write, maintain or admin. Organization and repo membership are managed, respectively, with the Settings menu in the upper right-hand corner.

I belong to a variety of GitHub Organizations:

An optional special repo in an organization, .github, can be used to provide an organization-level README and default settings. I use mine to provide a brief introduction to an organization and links to its resources. For instance, see the .github/README.md file in my byandell-envsys and byandell-sysgen repositories. The envsys README.md is very simple, providing a one-paragraph intro and links to resources. In contrast, the sysgen README.md has dropdown sections to help organize multiple repos. This is done with old style HTML code:

<details>
<summary>QTL Repos</summary>
<br>
...
</details>

Connect with GitHub

Posit’s Connect is a platform for sharing resources such as R shiny apps, Quarto documents, and python apps.

Deployment of apps using GitHub repos to a Connect server can be tricky, as Connect relies on the renv package to create reproducible environments for your R projects. A message like Deployment error: unknown package source indicates that the renv package does not recognize where a package was installed, for instance if one uses devtools::install_github(). renv cannot track the source well enough to reproduce it, and it refuses to bundle the app as a result. The fix is to reinstall the package using renv::install() instead, which records the GitHub source in a way that renv can reproduce:

renv::install("github_user/package_name")
renv::snapshot()

After running those two lines, retry the deployment. The snapshot validator should pass and the bundle should reach the server cleanly. If for any reason that does not work, you can also try explicitly recording the source before deploying:

renv::record("github_user/package_name")

CodeSpaces within GitHub

Always stop a codespace when done to save resources!


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.