How do you cite a Github repository?
I would go with:
P.W.D. Charles, Project Title, (2013), GitHub repository, https://github.com/charlespwd/project-title
Or a bit different, depending on your citation style. Just is is crucial to include: author, title (if style includes it), year and link.
Of course if you do have a publication related to this piece of code (even if only by fact it is your first publication basing on this code), don't forget to cite is as well! (In the current academic system it is all that counts.)
And respective BibTeX entry:
@misc{Charles2013,
author = {Charles, P.W.D.},
title = {Project Title},
year = {2013},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/charlespwd/project-title}},
commit = {4f57d6a0e4c030202a07a60bc1bb1ed1544bf679}
}
Beware, this above are improvisations (especially the BibTeX entry), not standards.
Even for more established and citable things there are not set standards, see e.g.:
- How to cite a sequence from The On-Line Encyclopedia of Integer Sequences (OEIS)? - MathOverflow
See also:
- How to cite sourcecode from an svn repository - TeX.SE
- How to cite software in LaTeX - SuperUser.SE
EDIT:
See also how to assign DOI to a particular commit in your repository.
I was asked to provide my comment as an answer, so here it is. It is yet another way to cite software. However, it requires some effort from the software authors.
I developed an Open Source Web tool for modeling and gathering data when following a certain theory/methodology in software engineering. Here is how you would cite it:
Graziotin, D and Abrahamsson, P 2013. A Web-based modeling tool for the SEMAT Essence theory of software engineering. Journal of Open Research Software 1(1):e4, DOI: http://dx.doi.org/10.5334/jors.ad
This is possible because I opted to publish a software paper in the Journal of Open Research Software. It is a fully Open Access journal. This journal only accepts software papers on open source software for research.
A software paper is a special kind of paper, which describes the software-e.g., what is it about, implementation and architecture, its availability, and its reuse potential. The editorial process works as in any other research venue, and articles are peer-reviewed.
The article processing charges are 25GBP. However, they can be fully waived if you cannot afford them.
What it is nice with this approach is that researchers have an extra motivation to open their software for research: they get a publication for that, plus citations. Additionally, writing a software paper is far easier than writing a methodology paper.
I wrote a review of the journal on my blog. TL;DR; Great experience, go for it.
Now they become somehow citable by providing DOI references. That was on their 14th of May news: https://github.com/blog/1840-improving-github-for-science