blob: 1514b2b8018d105fc64f5d82c029e0dbf1e9687e [file] [log] [blame]
Dave Borowitzeb794ea2012-11-12 14:48:15 -08001Gitiles - A simple JGit repository browser
2==========================================
3
4Gitiles is a simple repository browser for Git repositories, built on JGit. Its
5guiding principle is simplicity: it has no formal access controls, no write
6access, no fancy Javascript, etc.
Eric Seidel48816fb2013-06-11 17:17:50 -07007
8
9BUILDING
10
Dave Borowitz4cecfb02014-03-21 09:49:57 -070011Gitiles requires Buck (http://facebook.github.io/buck/) to build.
Eric Seidel48816fb2013-06-11 17:17:50 -070012
Dave Borowitz4cecfb02014-03-21 09:49:57 -070013 sudo apt-get install ant
14 cd ${HOME}
15 git clone https://github.com/facebook/buck.git
16 cd buck
17 ant
18 sudo ln -s ${PWD}/bin/buck /usr/bin/buck
19 cd /path/to/gitiles
Dave Borowitz60079102014-07-29 12:51:05 -070020 git submodule update --init
Dave Borowitz4cecfb02014-03-21 09:49:57 -070021 buck build all
Eric Seidel48816fb2013-06-11 17:17:50 -070022
23
24TESTING
25
Dave Borowitzf5309232014-07-29 12:50:40 -070026 cd /path/to/repositories # Don't run from the gitiles repo.
Dave Borowitz4cecfb02014-03-21 09:49:57 -070027 /path/to/gitiles/tools/run_dev.sh
28
29This will recompile and start a development server.
Dave Borowitzf5309232014-07-29 12:50:40 -070030Open http://localhost:8080/ to view your local copy of gitiles, which will serve
31any repositories under /path/to/repositories.
Eric Seidel48816fb2013-06-11 17:17:50 -070032
33
34ECLIPSE
35
Dave Borowitz4cecfb02014-03-21 09:49:57 -070036If you'd like to use Eclipse to edit Gitiles, first generate a project file:
37 ./bucklets/tools/eclipse.py && ./bucklets/tools/eclipse.py --src
Eric Seidel48816fb2013-06-11 17:17:50 -070038
Dave Borowitz4cecfb02014-03-21 09:49:57 -070039Import the project in Eclipse:
40 File -> Import -> Existing Projects into Workpace
Eric Seidel48816fb2013-06-11 17:17:50 -070041
Dave Borowitz4cecfb02014-03-21 09:49:57 -070042The project only needs to be rebuilt if the source roots or third-party
43libraries have changed. For best results, ensure the project is closed in
44Eclipse before rebuilding.
Eric Seidel48816fb2013-06-11 17:17:50 -070045
46
47CODE REVIEW
48
49Gitiles uses Gerrit for code review:
50https://gerrit-review.googlesource.com/
51
52Gitiles uses the "git push" workflow described here:
53http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html
54With the server https://gerrit.googlesource.com/gitiles
55You'll need a password from: https://gerrit.googlesource.com/new-password
56
57Gerrit depends on "Change-Id" annotations in your commit message.
58If you try to push a commit without one, it will explain how to
59install the proper git-hook:
60
61curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \
62 https://gerrit-review.googlesource.com/tools/hooks/commit-msg
63chmod +x `git rev-parse --git-dir`/hooks/commit-msg
64
65Before you create your local commit (which you'll push to Gerrit)
66you will need to set your email to match your Gerrit account:
67git config --local --add user.email [email protected]
68
69Normally you'll create code reviews for pushes to master:
70git push origin HEAD:refs/for/master