Skip to content
Closer - The home of longitudinal research

How and where to share code?

There are dedicated platforms to share code and other project files which also enable collaborative working and version control.

ReShare at the UK Data Service

ReShare is the UK Data Service’s online data repository where researchers can archive, publish and share social science research data, as open or safeguarded data.

Researchers can also share syntax/code with the research community by self-depositing it on ReShare. If the code is already published elsewhere (such as GitHub), it is possible to create a metadata record in ReShare and link to this external location.

All data, code and metadata deposits are assigned a Digital Object Identifier (DOI). Find out more from the UK Data Service on their Sharing syntax page.

Open Science Framework (OSF)

The OSF is a free, open-source project management tool that supports researchers throughout the research project lifecycle. On the OSF, research teams can work privately on projects or make the project publicly accessible.

The OSF platform can store analysis, code and manuscript drafts. It automatically applies version control to keep track of any changes and can also keep the project organised with structured folders and project wikis to keep notes and project logs. Other accounts can be linked to the OSF, such as Dropbox, GitHub, or Figshare.

A public research project on the OSF can also be assigned a Digital Object Identifier (DOI) to make it easier to share and reference.

The OSF is recommended as a place to store code for published research as it is a permanent repository that won’t disappear if your account is deleted, and syntax files won’t get overwritten once they are published.

GitHub

Another popular way to share code used for research is through GitHub that is tailored towards version control and collaboration. The code for a particular research project is normally kept in a repository on GitHub, where you can also save other files, images, videos, spreadsheets, and data.

A repository often includes a README file which explains the project and the files in the repository. Environments such as GitHub also allow peer review of code to help improve quality and best practice.

Repositories can be made private or public. You might want to start with a private GitHub repository for your research project and make use of the version control and collaboration features within your research team, without other people being able to view your code and files.

Once the project is complete, you can publish the repository so it is visible to others, and they can view and download your code. Be aware that GitHub repositories are not permanent and can disappear if your account is deleted, so OSF is recommended for saving syntax files for published work.

There are templates available which show examples of using GitHub for different types of research project or paper. For example: