The website. Note that this repository is only for the website; issues with git itself should go to
JavaScript CSS HTML Ruby
Latest commit c898537 Sep 11, 2017 @pedrorijo91 pedrorijo91 committed on GitHub Merge pull request #1022 from benabbottnz/master
Perl website redirects to https

Git Homepage Build Status

This is the web application for the site. It is meant to be the first place a person new to Git will land and download or learn about the Git SCM system.

This app is written in Ruby on Rails and deployed on Heroku.


You'll need a Ruby environment to run Rails. First do:

$ rvm use 2.1.8
$ bundle install

Then you need to create the database structure:

$ rake db:migrate

Alternatively you can run the script at script/bootstrap which will set up Ruby dependencies and the local SQLite database.

Now you'll want to populate the man pages. You can do so from a local Git source clone like this:

$ GIT_REPO=../git/.git rake local_index

Or you can do it from GitHub (much slower) like this:

$ export API_USER=github_username
$ export API_PASS=github_password
$ rake preindex

Now you need to get the latest downloads for the downloads pages:

$ rake downloads

Now you'll probably want some book data. You'll have to have access to the Pro Git project on GitHub through the API.

$ export API_USER=github_username
$ export API_PASS=github_password
$ rake remote_genbook2

If you have 2FA enabled, you'll need to create a Personal Access Token.

That will generate the book content from the Asciidoc files fetched from the online repository and post it to the Rails server database. You can select a specific language by indicating it in the GENLANG environment variable:

$ GENLANG=zh rake remote_genbook2

Alternatively, you can get the book content from a repository on your computer by specifying the path in the GENPATH environment variable to the local_genbook2 target:

$ GENLANG=fr GENPATH=../progit2-fr rake local_genbook2 

Now you can run the Rails site to take a look. Specify an UPDATE_TOKEN so you can use the world's stupidest authentication mechanism:

$ UPDATE_TOKEN=something rails server

The site should be running on http://localhost:3000


To run the tests for this project, run:

$ rspec

To run the website for testing purposes, run:

$ rails server


If you wish to contribute to this website, please fork it on GitHub, push your change to a named branch, then send a pull request. If it is a big feature, you might want to start an Issue first to make sure it's something that will be accepted. If it involves code, please also write tests for it.


The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.