blob: dfc8497314a1f134bf5532ae75eec438ccc116c1 [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
20 buck build all
Eric Seidel48816fb2013-06-11 17:17:50 -070021
22
23TESTING
24
Dave Borowitz4cecfb02014-03-21 09:49:57 -070025 cd /path/to/repositories
26 /path/to/gitiles/tools/run_dev.sh
27
28This will recompile and start a development server.
29Open http://localhost:8080/ to view your local copy of gitiles.
Eric Seidel48816fb2013-06-11 17:17:50 -070030
31
32ECLIPSE
33
Dave Borowitz4cecfb02014-03-21 09:49:57 -070034If you'd like to use Eclipse to edit Gitiles, first generate a project file:
35 ./bucklets/tools/eclipse.py && ./bucklets/tools/eclipse.py --src
Eric Seidel48816fb2013-06-11 17:17:50 -070036
Dave Borowitz4cecfb02014-03-21 09:49:57 -070037Import the project in Eclipse:
38 File -> Import -> Existing Projects into Workpace
Eric Seidel48816fb2013-06-11 17:17:50 -070039
Dave Borowitz4cecfb02014-03-21 09:49:57 -070040The project only needs to be rebuilt if the source roots or third-party
41libraries have changed. For best results, ensure the project is closed in
42Eclipse before rebuilding.
Eric Seidel48816fb2013-06-11 17:17:50 -070043
44
45CODE REVIEW
46
47Gitiles uses Gerrit for code review:
48https://gerrit-review.googlesource.com/
49
50Gitiles uses the "git push" workflow described here:
51http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html
52With the server https://gerrit.googlesource.com/gitiles
53You'll need a password from: https://gerrit.googlesource.com/new-password
54
55Gerrit depends on "Change-Id" annotations in your commit message.
56If you try to push a commit without one, it will explain how to
57install the proper git-hook:
58
59curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \
60 https://gerrit-review.googlesource.com/tools/hooks/commit-msg
61chmod +x `git rev-parse --git-dir`/hooks/commit-msg
62
63Before you create your local commit (which you'll push to Gerrit)
64you will need to set your email to match your Gerrit account:
65git config --local --add user.email [email protected]
66
67Normally you'll create code reviews for pushes to master:
68git push origin HEAD:refs/for/master