Skip to main content
v2026.11,772 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 22 Aug 2026
Share this

Ask CASRAI · included with Regulatory Radar

Ask about Code repository

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

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",
  "sameAs": [
    "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-08-22T15:37:03",
  "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 →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.