GitHub is a commonly-used web-based Git repository-hosting service. You can connect one GitHub repository per OSF project. Different repositories can be linked to different components within the same project. Files added to your GitHub repository will be accessible via OSF. Likewise, files added to the GitHub repository from your OSF account will update your GitHub account with those files. You can also create a new GitHub repository from your OSF project by clicking Create repo from the "Add-ons" tab.
The GitHub add-on allows you to connect external content to OSF. This connection does not store or back up this content on OSF. To back up your content to OSF Storage, consider registering your project.
1. Enable GitHub in your project
First, open your project, then click the Add-ons tab in the navigation bar.
You will be taken to the "Add-ons" page for the project.
In the list of add-ons, click the Enable link next to GitHub.
The GitHub terms will appear.
Read the terms, then click the Confirm button.
2. Configure GitHub
Find GitHub in the "Configure Add-ons" section, then click the Connect Account link.
Log in to GitHub, then you will be taken to the "OAuth" page for GitHub. If you want to connect to an organization, click Grant (if you're an owner of the organization) or Request (if you're a member of the organization).
Then click the green Authorize CenterForOpenScience button.
The "Import GitHub Account" modal will appear.
Your GitHub repositories and organizations will be imported into your OSF project.
3. Select a repository
Next, select a repository from the menu, then click Save.
GitHub will be connected to your project.