A simple JGit repository browser for gerrit

  "Gitiles is a simple repository browser for Git repositories, built on JGit. "

Posted by Dongyupu on January 29, 2018

官方

Gitiles - A simple JGit repository browser

Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.

Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.

Configuration

Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.

2.15下载地址

  • 下载 gitiles.jar 拷贝到 plugins目录下
  • 修改gerrit配置文件 etc/gerrit.config添加如下内容
[Gitiles]
        type = custom
        linkname = gitiles
        url = plugins/gitiles/
        revision = ${project}/+/${commit}
        project = ${project}
        branch = ${project}/+/${branch}
        filehistory = ${project}/+log/${branch}/${file}

重启gerrit即可。

我参考的这里