Skip to main content
v2026.11,986 entries · CC-BY 4.0
CASRAICASRAI Working GroupsHelp write the standards you have to implement24 working groups propose, review and ratify the terms CASRAI publishes, one per dictionary domain. Community and observer seats start at about two hours a month; chairs and co-chairs give 6–8 hours a month. Applications are reviewed.Apply to join a group CASRAI · Volunteer seats
Dictionary termTrack BProposedv2026.2

Code repository

A version-controlled storage location for source code, typically operated on top of a distributed version-control system such as Git, exposing the code's full revision history, branches, tags, and (often) collaboration features such as issues, pull requests, and code review.

ByCASRAI Editorial Board
· Last updated 5 Sept 2026

Working group for this domain: Research data infrastructure working group

Share this

Ask CASRAI · full access

Ask about Code repository

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Editorial commentary

Code repository in practice

Code repositories are the canonical home of research software during active development. Platforms include GitHub, GitLab, Bitbucket, Codeberg, and self-hosted Git instances; Mercurial and SVN platforms persist in some communities but have been largely superseded by Git in current research-software practice. Within research-information ecosystems, code repositories are distinct from but linked to data repositories: a code repository may be referenced from a dataset’s DataCite metadata via an ‘IsSupplementedBy’ relationship, or vice versa via ‘IsSupplementTo’.

Live repository vs. archived, citable release

A live code repository is not, by itself, a citable research output. Its history can be rewritten, its default branch renamed, or the entire repository deleted — none of which a reader who cited “the GitHub repository” in a paper’s methods section can control or verify afterward. Standard practice for citable research software is to archive a tagged release into a service that mints a persistent identifier: Zenodo’s GitHub integration automatically creates a versioned DOI for each tagged release, and Software Heritage independently archives and indexes the full history of public repositories regardless of whether the original platform survives. A code availability statement should point to the archived, DOI’d release, not the live repository URL alone.

Supporting metadata

A well-maintained code repository intended for reuse typically includes a CITATION.cff file (a plain-text, machine-readable citation metadata format supported by GitHub’s native “cite this repository” feature and increasingly requested by software papers), a licence file, and — for computational-environment reproducibility — a container definition (see container images) or a workflow description in a language covered under CWL/WDL.

Worked example

A lab publishes analysis code on GitHub throughout a project, then tags a v1.0 release at submission time; Zenodo mints a DOI for that exact snapshot, and the paper’s code availability statement cites the DOI rather than the repository’s default branch, which will keep changing after publication.

Counter-example

A zip file of source code attached to a personal webpage, with no version history, is not a code repository in the version-control sense used here — it lacks the revision history, branching, and collaborative review mechanisms (pull requests, issue tracking) that define the category.

References

  • Chacon, S., Straub, B., ‘Pro Git’, Apress, 2nd edition, 2014 (git-scm.com/book).

Examples

Worked examples

  • Is an instance

    A Git repository on GitHub for an open-source research software project.

  • Is an instance

    A self-hosted GitLab repository at a research institute for internal scientific code.

Counter-examples

Looks similar, but isn't

  • Not an instance

    A zip file of source code on a personal webpage is not a code repository in the version-control sense.

  • Not an instance

    A data-only repository with no source code is not a code repository.

Also known as

Source code repository · Code repo

Machine-readable encodings

Use in your systems

JATS XML <kwd> element
xml
<kwd vocab="CASRAI Dictionary"
     vocab-identifier="https://casrai.org/dictionary/"
     vocab-term="Code repository"
     vocab-term-identifier="https://casrai.org/dictionary/term/code-repository">Code repository</kwd>
Schema.org DefinedTerm (JSON-LD)
Schema.org DefinedTerm (JSON-LD)
json
{
  "@context": "https://schema.org",
  "@type": "DefinedTerm",
  "@id": "https://casrai.org/dictionary/term/code-repository",
  "name": "Code repository",
  "identifier": "https://casrai.org/dictionary/term/code-repository",
  "description": "A version-controlled storage location for source code, typically operated on top of a distributed version-control system such as Git, exposing the code's full revision history, branches, tags, and (often) collaboration features such as issues, pull requests, and code review.",
  "inDefinedTermSet": "https://casrai.org/dictionary/domain/data-infrastructure#set",
  "url": "https://casrai.org/dictionary/term/code-repository",
  "alternateName": [
    "Source code repository",
    "Code repo"
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "publisher": {
    "@id": "https://casrai.org/#organization"
  },
  "author": {
    "@id": "https://casrai.org/#editorial-team"
  },
  "datePublished": "2026-05-21T02:18:43Z",
  "dateModified": "2026-09-05T17:31:10Z",
  "inLanguage": "en",
  "isAccessibleForFree": true
}

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →