Kohana 3.2.0: Version Control your application with GIT

Follow these steps to manage your kohana application using GIT:

 

1. Create an empty directory

$ mkdir insertcoin.local && cd insertcoin.local

 

2. run git init to create the bare structure for a git repository

$ git init

 

3. create a folder for the core

$ mkdir vendor

 

4. Add submodules:

$ cd insertcoin.local/

$ git submodule add git://github.com/kohana/core.git vendor/kohana

$ git submodule add git://github.com/kohana/database.git modules/database

$ git submodule add git://github.com/kohana/cache.git modules/cache

$ git submodule add git://github.com/kohana/image.git modules/image

$ git submodule add git://github.com/kohana/pagination.git modules/pagination

 

5. Init these submodules

$ git submodule init

$ git commit -m 'Added core kohana and initial submodules [cache,database,image,pagination]'

 

6. push these changes

$ git pull origin master

$ git push origin master

 

 

7 Get some more files:

$ mkdir html

$ cd html

$ wget https://raw.github.com/kohana/kohana/3.2/master/index.php

$ cd ../modules/application/

$ wget https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php

 

 

Chage a few settings:
html/index.php

$application = '../modules/application';

$modules = '../modules';

$system = '../vendor/kohana';

 

modules/application/bootstrap.php

date_default_timezone_set('America/Los_Angeles');

 

Kohana::init(array(
       'base_url'   => '/',
       'index_file' => false,
       'cache_dir'  => DOCROOT.'../cache'
));
Kohana::$log->attach(new Log_File(DOCROOT.'../logs'));
Kohana::modules(array(
       // 'auth'       => MODPATH.'auth',       // Basic authentication
       'cache'      => MODPATH.'cache',      // Caching with multiple backends
       // 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
       'database'   => MODPATH.'database',   // Database access
       'image'      => MODPATH.'image',      // Image manipulation
       // 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
       // 'unittest'   => MODPATH.'unittest',   // Unit testing
       // 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
       ));
 
 
 

 

$ git clone git://github.com/kohana/core.git vendor/kohana/

 

$ mkdir -p modules/application/classes/controller

$ mkdir -p modules/application/config

$ touch -p modules/application/classes/controller/.gitignore

$ mkdir -p modles/application/views/templates/default

$ touch -p modules/applcation/views/template/default/.gitignore

wget https://github.com/kohana/kohana/raw/3.2/master/index.php

git clone mt:~/domains/git.portnumber53.com/html/in.sert.co.in insertcoin.local

$ cd modules/application

$ wget https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php 

 

 

 

 

 

 

Setting the push script for the site:

 

$ mkdir export

$ git clone http://git.portnumber53.com/in.sert.co.in.git export/in.sert.co.in

$ git clone http://git.portnumber53.com/in.sert.co.in.git ~/domains/in.sert.co.in.temp

Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • IGlr