GitBot is the bot used in the #git IRC channel on freenode. It's source is also kept in Git and can be found on GitHub.
GitBot is maintained by Pieter de Bie. You can email Pieter at email@example.com. Questions can also be directed to 'Pieter' on freenode.
GitBot allows you to scan Git repositories for objects mentioned in an IRC channel. This is useful for referring to a specific commit or file, which can then be viewed online using the link GitBot provides. Currently, only Gitweb and local repositories are supported. As soon as GitHub has a suitable API, support for GitHub will also be added.
GitBot works by through a list of provided Git repositories. It can scan this list every time an object is mentioned.
GitBot can be invoked implicitly by supplying a sha1 of an object, at least 7 characters long. If GitBot finds such a phrase, it tries to look up the object on all the supplied Git repositories. If it find one, it creates a tinyurl and returns this in the IRC channel:
23:57 < Pieter> Hey, look how interesting 65c35b2256ecbfaebcf04559fe6070807646afff is! 23:57 < Gitbot> [git 65c35b225]: http://tinyurl.com/6mxgqg -- t7001: fix "git mv" test
GitBot can also be invoked explicitly. The syntax is the following:
Where Repo and Ref are optional. This means that you can refer to the `master` branch by using
<master> in the IRC channel:
23:55 < Pieter> <master> 23:55 < Gitbot> [git master]: http://tinyurl.com/68cfzf -- Git.pm: Make File::Spec and File::Temp requirement lazy
<HEAD:Documentation/githooks.txt> will supply a link to the newest githooks.txt file.
Using the Repo part, you can specify which repository to look in. For example, you can look up the `README` of Egit:
00:04 < Pieter> <HEAD:README> 00:04 < Gitbot> [git README]: http://tinyurl.com/3pcuxm [blob] 00:04 < Pieter> <egit HEAD:README> 00:04 < Gitbot> [egit README]: http://tinyurl.com/6jenea [blob]
You can also use URL-like strings to specify repositories that are not in the supplied repository list, for example:
23:41 < Pieter> <repo:glibc.git HEAD:README> 23:41 < Gitbot> [glibc README]: http://tinyurl.com/6e536k [blob]
will look up the README on the main branch in the `glibc.git` repository on 
GitBot also allows you to lookup manpages for git. It does this by responding to any text along the lines of 'man git-log':
14:20 < Pieter> read the man git-log! 14:20 < Gitbot> Pieter: [git-log]: http://tinyurl.com/5pdrmq
It is also possible to let GitBot give links to FAQ entries on the GitFaq page:
14:03 < Pieter> $faq pushf 14:03 < Gitbot> Pieter: pushf: You shouldn't push a rebased repository. See http://git.or.cz/gitwiki/GitFaq#pushf
This works by adding a macro on the faq page. For example, the pushf macro above was created by adding :
<<GitLink(pushf, You shouldn't push a rebased repository)>>
To the FAQ page at the right place. This means that everybody is able (and invited) to add or change FAQ replies by the bot.