- Windows 10
- Latest
RandRStudio(admin required [or use versions onSoftware Centre]) - Latest git (no admin required)
R project with "Version Control"
- Open https://www.github.com and sign in
- Create a new repository: the name of this repository is likely to be the
Rproject name - choose carefully - Open
RStudio File > New Project... > Version Control > Git: fill out details, pasting the URL of thegitrepo you just created into theRespository URLfield, and I recommend using the repo name for theRProject directory name- Click
Create project - Write code, commit and push, etc.
For alternative options, e.g., adding git to an existing project, you'll have to fiddle in git cli. This is easy, but not covered here. Instead, see tutorial like this: https://jennybc.github.io/2014-05-12-ubc/ubc-r/session03_git.html#learngit.
GitHub issues
Install the github command line interface tool gh:
- Download
ghfrom https://github.com/cli/cli - Put in a location on C: where it can be executed, e.g.,
~/bin
Use the function ghi in script ghi.R.
Alternatively, Run something like: gh issue create --title "A test issue" --body "See if this works" --assignee @me. Other options to gh issue create include:
--title "My new issue"--body "Here are more details."--assignee @me,monalisa--label "bug,help wanted"--project onboarding--milestone "learning codebase"
You can close an issue by including a special command in your commit message. See https://r-pkgs.org/git.html#github-issues. For example:
This is a git commit message that closes issue #27: Closes #27
See https://cran.r-project.org/web/packages/gh/gh.pdf
https://www.garrickadenbuie.com/blog/shrtcts-reprex-to-issue/