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.