|
1 | 1 | Gitonomy browser
|
2 | 2 | ================
|
3 | 3 |
|
| 4 | +Gitonomy browser is a handy tool to visualize your local git repositories. |
| 5 | + |
| 6 | +It's still a work in progress, feel free to `contribute on github`_. |
| 7 | + |
| 8 | +Built with `Silex`_ and `gitlib`_ (PHP). |
| 9 | + |
4 | 10 | Installation
|
5 |
| ------------- |
| 11 | +............ |
| 12 | + |
| 13 | +To install project, you first need to clone is using ``git``. When project is |
| 14 | +cloned, you will need to configure it. To do so, go to ``config`` folder and |
| 15 | +copy distributed files: |
6 | 16 |
|
7 | 17 | .. code-block:: bash
|
8 | 18 |
|
9 |
| - git clone [email protected]:gitonomy/browser.git /path/to/install |
10 |
| - cd /path/to/install |
11 |
| - cp config_dist.php config.php |
| 19 | + git clone [email protected]:gitonomy/browser.git gitonomy-browser |
| 20 | + cd gitonomy-browser/config |
| 21 | + cp dev.php-dist dev.php |
| 22 | + cp prod.php-dist prod.php |
| 23 | +
|
| 24 | +Edit ``prod.php`` and configure where your git repositories are located. You |
| 25 | +can configure it in 3 different ways. |
12 | 26 |
|
13 |
| -Edit ``config.php`` and modify array to return instances of ``Repository`` objects on each of your projects: |
| 27 | +First way to configure is to give an exhaustive list of repositories you want: |
14 | 28 |
|
15 | 29 | .. code-block:: php
|
16 | 30 |
|
17 |
| - <?php return array( |
18 |
| - 'symfony' => new Gitonomy\Browser\Git\Repository('/var/www/symfony'), |
19 |
| - 'silex' => new Gitonomy\Browser\Git\Repository('/var/www/silex'), |
20 |
| - 'twig' => new Gitonomy\Browser\Git\Repository('/var/www/twig'), |
| 31 | + <?php # prod.php |
| 32 | +
|
| 33 | + $app['repositories'] = array( |
| 34 | + 'foobar' => new Gitonomy\Git\Repository('/var/www/foobar'), |
| 35 | + 'barbaz' => new Gitonomy\Git\Repository('/var/www/barbaz'), |
21 | 36 | );
|
22 | 37 |
|
23 |
| -You can also map to bare repositories. |
| 38 | +The second way is to use recursive function to detect repositories. It's very |
| 39 | +useful if you have multi-level folders: |
| 40 | + |
| 41 | +.. code-block:: php |
| 42 | +
|
| 43 | + <?php # prod.php |
| 44 | +
|
| 45 | + $app['repositories'] = '; |
| 46 | +
|
24 | 47 |
|
25 |
| -When you have filled the file, launch `composer`_ to fetch dependencies and make project workable: |
| 48 | +When you have filled it, launch `composer`_ to fetch dependencies and make |
| 49 | +project workable: |
26 | 50 |
|
27 | 51 | .. code-block:: bash
|
28 | 52 |
|
29 | 53 | php composer.phar install
|
30 | 54 |
|
31 | 55 | .. _composer: http://packagist.org
|
| 56 | +.. _silex: http://silex.sensiolabs.org/ |
| 57 | +.. _gitlib: https://github.com/gitonomy/gitlib |
| 58 | +.. _contribute on github: https://help.github.com/articles/fork-a-repo |
0 commit comments