Move to git-archive for zip support
[gitphp.git] / README
Chris Han 1 Installing GitPHP
2
3 Minimum requirements:
4 git
5 diff
6 Apache (or other php-compatible webserver)
7 PHP
8 Smarty (smarty.net)
9
10
11 To begin, you need to have your git repositories set up in a directory that the
12 webserver can access. They can be in subdirectories within that, but you will
13 need a base directory to tell GitPHP where to look for repositories. These
14 must be bare repositories - for those who don't know, the directory of source
Chris Han 15 code you have is your working copy, and the .git hidden directory inside of that
Chris Han 16 is the actual repository, which is what GitPHP reads. There are files in here
17 like HEAD, COMMIT_EDITMSG, description, etc.
18
19 You can make a copy of your bare repository by running:
20
21 cd myproject
22 cp -r .git /gitprojects/myproject.git
23
24 Or, a new bare repository can be initialized with:
25
Chris Han 26 mkdir mybareproject
Chris Han 27 cd mybareproject
28 git-init --bare
29
30 Once you have your projects in a directory, something like:
31
32 /gitprojects/project1.git
33 /gitprojects/project2.git
34 /gitprojects/subdir/project3.git
35
Chris Han 36 You can begin setting up GitPHP. Put the GitPHP files in a place
Chris Han 37 readable by your webserver. You will need to change the permissions of the
38 templates_c directory to be writable by your webserver. This can be done
39 by either:
40
41 chown apache:apache templates_c
42 (assuming your webserver runs as user/group apache - this is the better way)
43
44 or:
45
46 chmod 777 templates_c
47
48 Then, you will need to set up your config file. In the config directory,
49 copy the example config file, gitphp.conf.php.example, to gitphp.conf.php.
50
51 (Note for upgrades: updated versions will not overwrite your old
52 gitphp.conf.php, but they will update gitphp.conf.php.example. When you
53 upgrade, you may want to check for new config options in the example file
54 and copy them to your config file)
55
56 Now read through the config file and set up the options appropriately.
57 Every config option is explained in the comments. Many GitPHP features
58 are disabled by default since they require setting config options a
59 certain way, so if you don't look through the config file you won't
60 get many of the features.
61
62 The most important setting is the 'projectroot' setting, which specifies
63 where your git repositories are - following the previous example, it would
64 be set up as "/gitprojects/".
65
66 If you installed Smarty in a nonstandard directory (ie not in a standard
67 php include directory, and not as a subdirectory inside your GitPHP
68 directory), then you will need to set the 'smarty_prefix' config item.
69
70 If you want to set up categories for your projects, you need to set up the
71 $git_projects array - the definition and structure of this is explained in
72 the config file.
73
74 If you want to use syntax highlighting with GeSHi (http://qbnz.com/highlighter/),
75 you will need to change the config key 'geshi' to true and set up the
76 'geshiroot' key to point to the geshi directory if it's not in a standard php
77 include directory or a subdirectory of GitPHP, same as with smarty.
Chris Han 78
79 If you want to edit the text header that appears above the project list on the
80 home page, edit templates/hometext.tpl.
81
comments