{"id":786,"date":"2012-04-24T22:17:40","date_gmt":"2012-04-25T06:17:40","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=786"},"modified":"2012-04-24T22:17:40","modified_gmt":"2012-04-25T06:17:40","slug":"kohana-3-2-0-version-control-your-application-with-git","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2012\/04\/24\/kohana-3-2-0-version-control-your-application-with-git\/","title":{"rendered":"Kohana 3.2.0: Version Control your application with GIT"},"content":{"rendered":"<p>Follow these steps to manage your kohana application using GIT:<\/p>\n<p>&nbsp;<\/p>\n<p>1. Create an empty directory<\/p>\n<p>$ mkdir insertcoin.local &amp;&amp;&nbsp;cd insertcoin.local<\/p>\n<p>&nbsp;<\/p>\n<p>2. run git init to create the bare structure for a git repository<\/p>\n<p>$ git init<\/p>\n<p>&nbsp;<\/p>\n<p>3. create a folder for the core<\/p>\n<p>$ mkdir vendor<\/p>\n<p>&nbsp;<\/p>\n<p>4. Add submodules:<\/p>\n<p>$ cd insertcoin.local\/<\/p>\n<p>$&nbsp;git submodule add git:\/\/github.com\/kohana\/core.git vendor\/kohana<\/p>\n<p>$ git submodule add git:\/\/github.com\/kohana\/database.git modules\/database<\/p>\n<p>$ git submodule add git:\/\/github.com\/kohana\/cache.git modules\/cache<\/p>\n<p>$ git submodule add git:\/\/github.com\/kohana\/image.git modules\/image<\/p>\n<p>$ git submodule add git:\/\/github.com\/kohana\/pagination.git modules\/pagination<\/p>\n<p>&nbsp;<\/p>\n<p>5. Init these submodules<\/p>\n<p>$ git submodule init<\/p>\n<p>$ git commit -m &#39;Added core kohana and initial submodules [cache,database,image,pagination]&#39;<\/p>\n<p>&nbsp;<\/p>\n<p>6. push these changes<\/p>\n<p>$ git pull origin master<\/p>\n<p>$ git push origin master<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>7 Get some more files:<\/p>\n<p>$&nbsp;mkdir html<\/p>\n<p>$ cd html<\/p>\n<p>$ wget&nbsp;<a href=\"https:\/\/raw.github.com\/kohana\/kohana\/3.2\/master\/index.php\">https:\/\/raw.github.com\/kohana\/kohana\/3.2\/master\/index.php<\/a><\/p>\n<p>$ cd ..\/modules\/application\/<\/p>\n<p>$ wget&nbsp;<a href=\"https:\/\/raw.github.com\/kohana\/kohana\/3.2\/master\/application\/bootstrap.php\">https:\/\/raw.github.com\/kohana\/kohana\/3.2\/master\/application\/bootstrap.php<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Chage a few settings:<br \/>\n\thtml\/index.php<\/p>\n<p>$application = &#39;..\/modules\/application&#39;;<\/p>\n<p>$modules = &#39;..\/modules&#39;;<\/p>\n<p>$system = &#39;..\/vendor\/kohana&#39;;<\/p>\n<p>&nbsp;<\/p>\n<p>modules\/application\/bootstrap.php<\/p>\n<p>date_default_timezone_set(&#39;America\/Los_Angeles&#39;);<\/p>\n<p>&nbsp;<\/p>\n<div>Kohana::init(array(<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;base_url&#39; &nbsp; =&gt; &#39;\/&#39;,<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;index_file&#39; =&gt; false,<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;cache_dir&#39; &nbsp;=&gt; DOCROOT.&#39;..\/cache&#39;<\/div>\n<div>));<\/div>\n<div>Kohana::$log-&gt;attach(new Log_File(DOCROOT.&#39;..\/logs&#39;));<\/div>\n<div>\n<div>Kohana::modules(array(<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;\/\/ &#39;auth&#39; &nbsp; &nbsp; &nbsp; =&gt; MODPATH.&#39;auth&#39;, &nbsp; &nbsp; &nbsp; \/\/ Basic authentication<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;cache&#39; &nbsp; &nbsp; &nbsp;=&gt; MODPATH.&#39;cache&#39;, &nbsp; &nbsp; &nbsp;\/\/ Caching with multiple backends<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;\/\/ &#39;codebench&#39; &nbsp;=&gt; MODPATH.&#39;codebench&#39;, &nbsp;\/\/ Benchmarking tool<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;database&#39; &nbsp; =&gt; MODPATH.&#39;database&#39;, &nbsp; \/\/ Database access<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;&#39;image&#39; &nbsp; &nbsp; &nbsp;=&gt; MODPATH.&#39;image&#39;, &nbsp; &nbsp; &nbsp;\/\/ Image manipulation<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;\/\/ &#39;orm&#39; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; MODPATH.&#39;orm&#39;, &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Object Relationship Mapping<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;\/\/ &#39;unittest&#39; &nbsp; =&gt; MODPATH.&#39;unittest&#39;, &nbsp; \/\/ Unit testing<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;\/\/ &#39;userguide&#39; &nbsp;=&gt; MODPATH.&#39;userguide&#39;, &nbsp;\/\/ User guide and API documentation<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp;));<\/div>\n<div>&nbsp;<\/div>\n<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<p>&nbsp;<\/p>\n<p>$ git clone git:\/\/github.com\/kohana\/core.git vendor\/kohana\/<\/p>\n<p>&nbsp;<\/p>\n<p>$ mkdir -p modules\/application\/classes\/controller<\/p>\n<p>$ mkdir -p modules\/application\/config<\/p>\n<p>$ touch -p modules\/application\/classes\/controller\/.gitignore<\/p>\n<p>$ mkdir -p modles\/application\/views\/templates\/default<\/p>\n<p>$ touch -p modules\/applcation\/views\/template\/default\/.gitignore<\/p>\n<p>wget&nbsp;https:\/\/github.com\/kohana\/kohana\/raw\/3.2\/master\/index.php<\/p>\n<p>git clone mt:~\/domains\/git.portnumber53.com\/html\/in.sert.co.in insertcoin.local<\/p>\n<p>$ cd modules\/application<\/p>\n<p>$ wget https:\/\/raw.github.com\/kohana\/kohana\/3.2\/master\/application\/bootstrap.php&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Setting the push script for the site:<\/p>\n<p>&nbsp;<\/p>\n<p>$ mkdir export<\/p>\n<p>$ git clone http:\/\/git.portnumber53.com\/in.sert.co.in.git export\/in.sert.co.in<\/p>\n<p>$&nbsp;git clone http:\/\/git.portnumber53.com\/in.sert.co.in.git ~\/domains\/in.sert.co.in.temp<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow these steps to manage your kohana application using GIT: &nbsp; 1. Create an empty directory $ mkdir insertcoin.local &amp;&amp;&nbsp;cd insertcoin.local &nbsp; 2. run git init to create the bare structure for a git repository $ git init &nbsp; 3. create a folder for the core $ mkdir vendor &nbsp;&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2012\/04\/24\/kohana-3-2-0-version-control-your-application-with-git\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-786","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=786"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/786\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}