Skip to main content
v2026.11,858 entries · CC-BY 4.0
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
Share this

Ask CASRAI · free to try

Ask about Code repository

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

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 free to read, with no account and no card.

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.

Editorial commentary

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).

Also known as

Source code repository · Code repo

Machine-readable encodings

Use in your systems

JATS XML <role> element
xml
<role vocab="credit"
      vocab-identifier="https://casrai.org/dictionary/"
      vocab-term="Code repository"
      vocab-term-identifier="https://casrai.org/dictionary/term/code-repository" />
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:43",
  "dateModified": "2026-09-05T17:31:10",
  "inLanguage": "en-GB",
  "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 →

Ask CASRAI · Regulatory Radar

Data sharing plan question? Get the requirement cited.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.