How to Cite GitHub: APA, MLA, IEEE, and Chicago Examples

Published: September 7, 2026

Here’s how to cite GitHub: list the author or organization name, the repository title, the year, and the repository URL, then format those pieces to match APA, MLA, IEEE, or Chicago style, whichever your instructor requires. This guide walks through examples for each style, plus how to cite a specific commit, release, or GitHub’s own CITATION.cff file.

Why You Need to Cite a GitHub Repository

Referencing someone else’s repository is not just good manners. In academic writing, citing a GitHub repository documents where your data, code, or tools came from so other researchers can verify and build on your work. Skipping this step can make it look like you are presenting someone else’s public code as your own, even when the repository is publicly available. Most open-source licensing terms, including MIT and GPL, also ask that you credit the original author when you reuse their code. The same underlying rules apply as when you cite a website in an essay, since a repository is simply a website hosting a project.

What to Include in a GitHub Citation

Every style needs the same core pieces of information, even though the format differs:

  • Author or organization name (check the repository’s “About” section or a CONTRIBUTORS file)
  • Repository title, exactly as it appears on GitHub
  • Year the repository was published or last updated
  • Version number, release tag, or commit hash if you need to point to an exact snapshot
  • Full repository URL

If the repository restricts public access or lists no individual author, use the organization or GitHub username that owns it instead. For the official formatting rules behind these pieces, see APA’s reference examples guide and MLA’s guide to citing source code. When you manage a public repository yourself, EssayReply’s source guide hub covers the same formatting rules for other source types.

How to Cite a GitHub Repository in APA, MLA, IEEE, and Chicago Style

The table below compares how each major style formats this information. Swap in the real author, title, year, and URL for your own project.

GitHub repository reference formats by style
StyleFormatExample
APA (7th ed.)Author. (Year). Title (Version) [Source code]. GitHub. URLTorvalds, L. (2024). Linux kernel (Version 6.8) [Source code]. GitHub. https://github.com/torvalds/linux
MLA (9th ed.)Author. “Title.” GitHub, Year, URL.Torvalds, Linus. “Linux Kernel.” GitHub, 2024, github.com/torvalds/linux.
IEEEAuthor, “Title,” GitHub repository, Year. [Online]. Available: URLL. Torvalds, “Linux kernel,” GitHub repository, 2024. [Online]. Available: https://github.com/torvalds/linux
Chicago (17th ed.)Author. “Title.” GitHub. Accessed Month Day, Year. URL.Torvalds, Linus. “Linux Kernel.” GitHub. Accessed March 4, 2026. https://github.com/torvalds/linux.

Worked example (APA): for a repository called “data-cleaning-scripts” by a user named “jsmith,” last updated in 2025, the APA reference reads: jsmith. (2025). data-cleaning-scripts [Source code]. GitHub. https://github.com/jsmith/data-cleaning-scripts

For an in-text citation, most styles use the author’s last name and year, such as (Torvalds, 2024) in APA or (Torvalds) in MLA. Once you have the author, title, and link, these citation tools can produce a formatted entry automatically: EssayReply’s APA generator, MLA generator, or IEEE generator.

Use GitHub’s Built-In CITATION File

GitHub lets repository owners add a CITATION.cff file to the root of their project so visitors know exactly how the maintainer wants the work cited, as explained in GitHub’s documentation on the feature. When a repository has this file, GitHub displays a “Cite this repository” button in the sidebar, giving quick access to both an APA and a BibTeX entry automatically. Always check for this file first. It reflects exactly how the author wants to be credited, and it may list contributors or a preferred title that differs from the plain repository name. If the file is missing or looks incomplete, GitHub’s support center walks through how to add one.

Citing a Specific Commit, Release, or Version

Academic and scientific writing often needs enough precision that another researcher can retrieve the exact code you used, not just whatever the repository looks like today. To do this, cite the specific commit hash, release tag, or version number instead of the repository’s default branch, the same way you would cite an issue by its issue number. Find a permanent link to any commit by clicking the commit hash on GitHub and copying the resulting URL, which stays fixed even after the code changes.

For a more formal academic reference, archive the repository with Zenodo for long-term access and a permanent DOI, a process covered in GitHub’s guide to referencing and citing content. Zenodo creates a snapshot of the repository at that release and assigns it a DOI you can cite the same way you would cite a journal article, which solves the problem of code changing after publication.

Citing GitHub Issues, Discussions, and Wikis

Not every source you need is the main repository. If you draw on a specific GitHub Issue, Discussion thread, or Wiki entry for research, cite that entry directly instead of the repository root, since the thread itself is the original source of the idea or fix you are referencing. Use the author’s username, the issue or thread title, the year it was posted, and the direct URL to that comment or page.

Pull requests you reference directly should be cited the same way, using the request’s number, title, author, and permanent URL. If you maintain the project yourself, submit a CITATION.cff file in a pull request so others can cite it correctly. The same logic applies to a forked repository: if you build on someone’s fork rather than the original project, cite the fork you actually used, and submit a correction to your own reference list if the upstream project later changes ownership. When a repository has moved under new management or been archived, cite the version you actually accessed. Checking the repository’s network graph and GitHub’s own support pages can help confirm which copy is the original source.

Common Mistakes When Citing a GitHub Repository

Frequent mistakes when citing GitHub
MistakeWhy It’s a Problem
Citing only the GitHub username, not the actual author nameUsernames are not always the legal or preferred name, so check the CITATION.cff file or profile page first.
Linking to the repository’s homepage instead of the specific file or commit you usedThe homepage always shows the newest version, so others cannot verify the exact code you cited.
Leaving out the year entirelyEvery major style requires a date, even for continuously updated repositories.
Mixing citation styles within the same paperPick one style, APA, MLA, IEEE, or Chicago, and use it for every entry in the document.
Forgetting to format the title consistently with your other referencesStyle guides expect repository titles to be treated the same way as other titled works.

Frequently Asked Questions About How to Cite GitHub

Do I need to cite a GitHub repository if the code is public and open source?

Yes. Being publicly available does not remove the need to credit the author. Open-source licensing under MIT or GPL still expects attribution, and integrity rules require you to cite any code, data, or text you did not write yourself.

How do I cite a GitHub Gist instead of a full repository?

Cite a Gist the same way you would cite a repository. Use the author’s name, a descriptive title (or “Untitled Gist” if none is given), the year, and the full Gist URL in place of the repository link.

What citation style should I use if my professor doesn’t specify one?

APA is the most common default for computer science and data-related coursework, while IEEE is standard in engineering journals. To learn which format your field prefers, check your department’s style guide, or ask your instructor before submitting.

Can I cite a specific commit or pull request instead of the whole repository?

Yes, and you should if precision matters. Copy the permanent commit link from GitHub and use it in place of the general repository URL, noting the commit hash or short SHA in your reference so readers can find that exact version.

Does the citation change if a repository has multiple contributors or a full team?

Yes, list every named author your style guide allows, separated the way that style formats multiple authors, or cite the organization name if the repository belongs to a team or company rather than individuals. When a repository lists dozens of contributors, most style guides let you cite the primary maintainer or the organization account instead of naming everyone, the same way a journal article with many co-authors is usually cited by the first author plus “et al.”

Was this article helpful?

Terry Williams

Written by

Terry Williams

Terry is a Chicago-based writer and editor who creates practical, student-friendly guides on essay writing, research, and citation styles (APA, MLA, and Chicago). He’s spent 15+ years editing educational content and building clear examples that help readers apply rules without guessing. When he’s not revising drafts, he’s usually turning messy notes into clean outlines and hunting down the one detail everyone skips.