{"id":141,"date":"2010-04-02T23:32:49","date_gmt":"2010-04-03T05:32:49","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=141"},"modified":"2014-11-19T11:26:26","modified_gmt":"2014-11-19T17:26:26","slug":"creating-a-git-repo-on-centos-5-4-and-then-using-it","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=141","title":{"rendered":"Creating a Git repo on CentOS 5.4 and then using it."},"content":{"rendered":"<p>Got some info from various sites, so thought I would consolidate it here.\u00a0 I just started a new project on my Mac and I want to back it up on the net.\u00a0 Here is what I did:<\/p>\n<h1>On CentOS 5.4 Server<\/h1>\n<pre>yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel autoconf curl curl-devel gcc\r\nldconfig<code>\r\nwget  http:\/\/www.codemonkey.org.uk\/projects\/git-snapshots\/git\/git-latest.tar.gz<\/code>\r\ntar zxvf git-latest.tar.gz\r\ncd git-&lt;date&gt;\r\nmake configure\r\n.\/configure --prefix=\/usr\r\nmake\r\nmake install<\/pre>\n<p>When done you should be able to run:<\/p>\n<pre>git<\/pre>\n<p>and see a help message.\u00a0 Nice!\u00a0 This means git is installed.\u00a0 Now let&#8217;s set up a repo.<\/p>\n<pre>mkdir -p \/var\/git\/cookingwright\r\ncd \/var\/git\/cookingwright.git\r\ngit\u00a0 init<\/pre>\n<p>Cool, we now have a blank repository on our CentOS 5.4 server.<\/p>\n<h1>On the Mac Book Pro<\/h1>\n<p>So I&#8217;ve been developing this base project on the MBP so now I want to make sure I start using SCM\/git.\u00a0 So I go to my app:<\/p>\n<pre>cd ~\/Sites\/cookingwright\r\ngit init\r\ngit add .\r\ngit commit -am 'initial release'\r\ngit remote add origin ssh:\/\/benincosa.com\/var\/git\/cookingwright<\/pre>\n<pre>git push origin master<\/pre>\n<p>Now I&#8217;m git-afied.\u00a0 Hurray!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got some info from various sites, so thought I would consolidate it here.\u00a0 I just started a new project on my Mac and I want to back it up on the net.\u00a0 Here is what I did: On CentOS 5.4 Server yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel autoconf curl curl-devel gcc ldconfig&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/141"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":3,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":2825,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/2825"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}