How to create a code repository for your project
Info
A "code repository" is where code gets published on GitHub. This is not to be confused with a codespace.
A codespace refers specifically to a virtual machine environment, that contains a copy of your repository code to work on.
You only need to create a code repository once for a particular project.
Create a new research code repository based on the research template.
- In your web browser, go to the research code template repository.
- Click the "Use this template" button to begin the process of creating a new research code repository for you to work on. The screenshot below shows this.
There are several options given when creating a new repository from a template.
Here is a quick explanation of the options:
- If you are creating a repository for an OpenSAFELY project,
you should choose
opensafely
as the repository owner. - If you are creating a repository for testing OpenSAFELY out, you should choose your own GitHub user account as the repository owner.
- You can enter any name and description that you choose for your repository.
- You can choose whether the repository visibility is public or private.
- You do not need to select "Include all branches".
- You can ignore the mention of "GitHub Apps from GitHub Marketplace" in GitHub's instructions for creating a new repository from a template.
If you are unsure of what to do, refer to GitHub's step-by-step instructions for creating a new repository from a template.
Warning
Creating a repository owned by your GitHub user account will enable you to:
- work on your OpenSAFELY research code in Codespaces
- check that your research code works with the OpenSAFELY platform
It will not allow you to run code on OpenSAFELY's platform.
For that, you would have to request that your repository is transferred to the opensafely
organization.
Approved OpenSAFELY users are able to create a repository within the opensafely
organization directly.