GitHub repositories
December 20 2022
github.Rmd
Create a GitHub repository
Whenever you start a new project, you should consider creating a new repository on GitHub. Not only will you then be using version control, but it allows you to collaborate easily with others, as well as organising your workflow. This guide shows you how to create a new repository on GitHub.
To start off, go to the SBOHVM organisation (on GitHub). During this course, this is where you’ll be creating all of your repositories. Once you’re there, click on the green New button.
You should always choose a short, descriptive name for your
repository. But in this case, to make it easier for us to identify you,
please include your name as well as an identifier associated with the
practical you’re working on, e.g. githubusernameSeries01
.
If your GitHub username has dashes or underscores, don’t include them in
the repository name however, as they are illegal in R package names.
Make sure you’re creating a Private
repository, check the box to Initialize
this repository with a README, then select Create repository.
Note that in Practical series 3 you’ll be writing a package… and when doing it’s good practice for the name of your repository to match the name of your package. It’s important to be aware that the name of a package “should contain only (ASCII) letters, numbers and dot, have at least two characters and start with a letter and not end in a dot” (ref). Though very few package names include a dot.
Since we’re not working with packages just yet, you could be more
flexible in naming this repository, but it’s better to start as you mean
to go on. Your GitHub repo should now contain a single
README.md
file look a bit like this:
If you want to learn more about creating projects (and using GitHub) in RStudio, click here.