Skip to content
CitationZ

How to Cite a GitHub Repository

Updated July 2026

A GitHub repository is cited as software: the author or organization, the repository name, a version (or commit/tag), the [Computer software] descriptor (APA), and the URL or DOI. If the project has a Zenodo DOI (many do, via the GitHub–Zenodo integration), cite the DOI — it's permanent.

Here's the format in each style, plus how to pin the exact version you used.

Cite code — free

The format

Treat the repo as software: author/org → title → version → [Computer software] (APA) → source/URL. The generator builds this from the Manual Entry Software / Code type.

APA 7

The pandas development team. (2024). pandas (2.2.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.3509134

In-text(The pandas development team, 2024)

MLA 9

The pandas development team. "pandas." Zenodo, 2024.

In-text(The pandas development team)

Chicago

The pandas development team. "pandas." Zenodo. 2024.

In-text(The pandas development team 2024)

The pieces

  • Author — the user or organization that owns the repo (e.g., a person, or The pandas development team).
  • Title — the repository/project name as published.
  • Version — the release tag (v2.2.0) or, if untagged, the commit hash or access date — so your citation pins exactly what you used.
  • Source — the host (GitHub) or, better, the Zenodo DOI if the project archives releases there.
  • URL — the repository URL when there's no DOI.

Pin the version — code changes

Code is a moving target: main today isn't main next month. Cite the specific release/tag you used, or the commit hash, so your citation is reproducible. Many research projects mint a DOI per release through Zenodo — prefer that DOI, since it's permanent and points to that exact snapshot.

Citing code vs. the paper that describes it

Many tools have both a repository and a published paper. Cite the software when you used the code, and the paper when you're referencing the method or results — often you cite both. Check the repo's README or CITATION.cff file, which frequently tells you exactly how the authors want to be cited. For the paper, use the DOI generator. Official software-citation guidance: the APA Style Blog and Purdue OWL.

Keep every citation you make.

A free account saves your citation history and organizes sources into projects with notes and tags.

Create a free account →

Find the sources you should be citing.

Premium searches 250 million scholarly works by topic, recommends citations for your claims, and flags statements in your writing that need support.

Go Premium — $5/month

Frequently asked questions

How do I cite a GitHub repo in APA?
As software: Author/Org. (Year). Repository name (Version) [Computer software]. Source. URL or DOI. Pin the version or commit you used.
Should I cite the URL or a DOI?
Prefer a DOI if the project archives releases on Zenodo — it's permanent and points to the exact version. Use the repository URL only when there's no DOI.
What version do I cite if the repo has no releases?
Use the commit hash you worked from (and/or the access date). The goal is reproducibility — your reader should be able to find the exact state of the code.
Do I cite the code or the paper?
Cite the software when you used the code, the paper when you reference its method or findings — often both. Check the repo's CITATION.cff or README for the authors' preferred citation.

Related

Generate a citation now — free