 {"id":254,"date":"2011-04-05T21:24:50","date_gmt":"2011-04-06T02:24:50","guid":{"rendered":"http:\/\/www.networkjack.info\/blog\/?p=254"},"modified":"2014-03-13T13:50:11","modified_gmt":"2014-03-13T18:50:11","slug":"simple-checkout-of-phpmyadmin-with-git","status":"publish","type":"post","link":"http:\/\/www.networkjack.info\/blog\/2011\/04\/05\/simple-checkout-of-phpmyadmin-with-git\/","title":{"rendered":"Simple Checkout of phpMyAdmin with git"},"content":{"rendered":"<p>When setting up webservers for clients, I&#8217;ll usually configure and secure an installation of phpMyAdmin to allow them easy access to the MySQL database server.<\/p>\n<p>I would also want to make sure it was easy to update that installation to the latest stable version. In the past this was easily done by initially checking out the STABLE tag from their Subversion repository using the following style command:<\/p>\n<pre style=\"padding-left: 30px;\">svn co https:\/\/phpmyadmin.svn.sourceforge.net\/svnroot\/phpmyadmin\/tags\/STABLE\/phpMyAdmin<\/pre>\n<p>and then when I wanted to update, it was a simple matter of running:<\/p>\n<pre style=\"padding-left: 30px;\">svn update<\/pre>\n<p>Well, the phpMyAdmin folks switched over to using git as their SCM system and unfortunately, they didn&#8217;t post any instructions on how a web server administrator who was <strong>never<\/strong> going to be changing\/committing code back into the system would perform the same action using git. It took me about an hour of searching, reading, digesting how git works, cursing, but I finally came up with the following set of git commands necessary to checkout the STABLE branch of phpMyAdmin:<\/p>\n<pre style=\"padding-left: 30px;\">git clone --depth=1 git:\/\/github.com\/phpmyadmin\/phpmyadmin.git\r\ncd phpmyadmin\r\ngit remote update\r\ngit fetch\r\ngit checkout --track -b PMASTABLE\u00c2\u00a0 origin\/STABLE<\/pre>\n<p>&#8230;what that means is: clone the main repository from the specified path, drop into the newly created repository directory and thirdly create a new branch in the local repository called PMASTABLE that will track the remote repository&#8217;s branch called &#8220;origin\/STABLE&#8221;.<\/p>\n<p>The &#8220;depth=1&#8221; parameter tells git not to copy a huge set of changes, but only the most recent set.<\/p>\n<p>So, from here on, I should be able to merely run: &#8220;git pull&#8221; on that repository and it should update it to the latest STABLE.<\/p>\n<p>Hopefully, others will find this useful.<\/p>\n<p><strong>UPDATE<\/strong> &#8211; Mar 13, 2014<br \/>\nI updated the above commands to show the correct GitHub URL and two more commands to make sure the local repo sees the STABLE branch before trying to create a local branch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When setting up webservers for clients, I&#8217;ll usually configure and secure an installation of phpMyAdmin to allow them easy access to the MySQL database server.&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.networkjack.info\/blog\/2011\/04\/05\/simple-checkout-of-phpmyadmin-with-git\/\">Continue reading<span class=\"screen-reader-text\">Simple Checkout of phpMyAdmin with git<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,20,38,8,13,4],"tags":[68,67,69],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-database","category-mysql","category-php","category-servers","category-web-app-development","category-web-software","tag-git","tag-phpmyadmin","tag-subversion","entry"],"_links":{"self":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/254"}],"collection":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":3,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":312,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions\/312"}],"wp:attachment":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}