Use message function
[gitphp.git] / README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Installing GitPHP

Minimum requirements:
git
diff
Apache (or other php-compatible webserver)
PHP
Smarty (smarty.net)


To begin, you need to have your git repositories set up in a directory that the
webserver can access.  They can be in subdirectories within that, but you will
need a base directory to tell GitPHP where to look for repositories.  These
must be bare repositories - for those who don't know, the directory of source
code you have is your working copy, and the .git hidden directory inside of that
is the actual repository, which is what GitPHP reads.  There are files in here
like HEAD, COMMIT_EDITMSG, description, etc.

You can make a copy of your bare repository by running:

cd myproject
cp -r .git /gitprojects/myproject.git

Or, a new bare repository can be initialized with:

mkdir mybareproject
cd mybareproject
git-init --bare

Once you have your projects in a directory, something like:

/gitprojects/project1.git
/gitprojects/project2.git
/gitprojects/subdir/project3.git

You can begin setting up GitPHP.  Put the GitPHP files in a place
readable by your webserver.  You will need to change the permissions of the
templates_c directory to be writable by your webserver.  This can be done
by either:

chown apache:apache templates_c
(assuming your webserver runs as user/group apache - this is the better way)

or:

chmod 777 templates_c

Then, you will need to set up your config file.  In the config directory,
copy the example config file, gitphp.conf.php.example, to gitphp.conf.php.

(Note for upgrades: updated versions will not overwrite your old
gitphp.conf.php, but they will update gitphp.conf.php.example.  When you
upgrade, you may want to check for new config options in the example file
and copy them to your config file)

Now read through the config file and set up the options appropriately.
Every config option is explained in the comments.  Many GitPHP features
are disabled by default since they require setting config options a
certain way, so if you don't look through the config file you won't
get many of the features.

The most important setting is the 'projectroot' setting, which specifies
where your git repositories are - following the previous example, it would
be set up as "/gitprojects/".

If you installed Smarty in a nonstandard directory (ie not in a standard
php include directory, and not as a subdirectory inside your GitPHP
directory), then you will need to set the 'smarty_prefix' config item.

If you want to set up categories for your projects, you need to set up the
$git_projects array - the definition and structure of this is explained in
the config file.

If you want to use syntax highlighting with GeSHi (http://qbnz.com/highlighter/),
you will need to change the config key 'geshi' to true and set up the
'geshiroot' key to point to the geshi directory if it's not in a standard php
include directory or a subdirectory of GitPHP, same as with smarty.

If you want to edit the text header that appears above the project list on the
home page, edit templates/hometext.tpl.

comments