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
<role vocab="credit"
vocab-identifier="https://casrai.org/dictionary/"
vocab-term="Code repository"
vocab-term-identifier="https://casrai.org/dictionary/term/code-repository" />{
"@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
}







