<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Rubynaut: Git: Easy way to setup a private remote repository</title>
    <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Git: Easy way to setup a private remote repository</title>
      <description>&lt;p&gt;Git is different from svn and create a private repository on a remote server too. No need of gitosis or git-daemon for this.&lt;/p&gt;


	&lt;p&gt;I start from an existing project and a server I already access to with ssh key.&lt;/p&gt;


	&lt;p&gt;First, initialize git in your project:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;git init
git add .
git commit -m 'initial import'&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;[update]&lt;/p&gt;


	&lt;p&gt;&lt;del&gt;Then create a git copy of your project into a git archive &lt;em&gt;my_project_folder.git&lt;/em&gt;.&lt;/del&gt;&lt;/p&gt;


	&lt;p&gt;&lt;del&gt;git clone&amp;#8212;bare my_project_folder my_project_folder.git&lt;/del&gt;&lt;/p&gt;


	&lt;p&gt;Copy &lt;del&gt;this archive&lt;/del&gt; the .git folder to your remote server:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;scp -rp .git user@server://path/to/repositories/my_project_folder.git&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Add this new repository in the config of your local project:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;git remote add my_remote_repo ssh://server/path/to/repositories/my_project_folder.git&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You&amp;#8217;re done. After a change you can commit and then push your change to the remote repo:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;git commit -m &amp;quot;message for change log&amp;quot;
git push my_remote_repo&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Use your own parameters for:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;em&gt;my_project_folder&lt;/em&gt; with the folder of your project&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;path/to/repositories&lt;/em&gt; with the path to your repository on the remote server&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;my_project_repo&lt;/em&gt; with the name you want for the remote repository, usually &lt;em&gt;origin&lt;/em&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;If you need a public repository, have look to gitosis or git-daemon. Best is Github.&lt;/p&gt;</description>
      <pubDate>Tue, 04 Mar 2008 20:41:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:8922639a-d762-404c-b73f-30b15c166893</guid>
      <author>stephane</author>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository</link>
      <category>git</category>
      <category>remote</category>
      <category>repository</category>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by RF</title>
      <description>&lt;p&gt;Jon Gretar, you should maybe checkout Mercurial (Hg), there&amp;#8217;s even a TortoiseHg project. It&amp;#8217;s a really great SCM (and fast)&lt;/p&gt;</description>
      <pubDate>Thu, 06 Mar 2008 18:25:19 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:a615c916-82c4-43db-9694-8e41ec81a030</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2030</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Chris</title>
      <description>&lt;p&gt;Yeah, it should ;)&lt;/p&gt;</description>
      <pubDate>Thu, 06 Mar 2008 03:57:50 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d2e6c40e-3954-44c9-99ba-e2d13f5eab9c</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2029</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Rich</title>
      <description>&lt;p&gt;Don&amp;#8217;t forget that your remote host has to have Git installed for this to work.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Mar 2008 00:55:17 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d2f4cae0-f2ce-4efe-9c7a-c77fba0567c3</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2028</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Stephane</title>
      <description>&lt;p&gt;Ok, thanks for the comment.&lt;/p&gt;


	&lt;p&gt;Should it even be:&lt;/p&gt;



scp -r .git remotehost:new_repo.git
</description>
      <pubDate>Wed, 05 Mar 2008 21:14:40 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:36f4b8e9-4a9f-490a-9672-6b778943fdd5</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2027</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Chris</title>
      <description>&lt;p&gt;How come you cloned your initial project? I usually just:&lt;/p&gt;


	&lt;p&gt;scp -r .git ssh://remotehost:new_repo.git&lt;/p&gt;


	&lt;p&gt;Then go from there.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 18:39:03 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:0d2a192e-4f09-4f8f-8b7e-b5c35726d71b</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2026</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Stephane</title>
      <description>&lt;p&gt;You&amp;#8217;re right, the learning curve is harder with git than with svn and for new users it&amp;#8217;s not simplifying life, at first. That&amp;#8217;s why I published this post to show an &amp;#8220;easy&amp;#8221; way of using git. Currently I only use clone, commit, and push.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 12:48:44 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:93af96ba-e161-435a-9854-a6c4c007af76</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2025</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Jon Gretar</title>
      <description>&lt;p&gt;Hey I&amp;#8217;m not judging. ;)&lt;/p&gt;


	&lt;p&gt;After watching the Peepcode screencast I decided not to go to Git. Just seemed to overly complicate things somehow when most users just simply need to know the &amp;#8220;svn add&amp;#8221; and &amp;#8220;svn commit&amp;#8221; commands and they are good for life. :)&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 12:02:17 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:35bf2843-92f2-427a-ae1d-865911f15052</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2024</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Stephane</title>
      <description>&lt;p&gt;This post is more about using git than moving from svn to git. But for my own experience, I did move to git because it&amp;#8217;s much faster and open new ways of social collaboration, as you can see on &lt;a href="http://github.com/" rel="nofollow"&gt;Github&lt;/a&gt;. Also I&amp;#8217;d prefer to make several local commits and then a bigger commit to a central repo rather than always push small changes to the repo, and I m not always connected. A last point, git is pretty well integrated in Textmate now.&lt;/p&gt;


	&lt;p&gt;Being said, people are free to use whatever SCM they like :)&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 11:53:41 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:ecbfc519-eb90-4b2e-b910-3c99669d49aa</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2023</link>
    </item>
    <item>
      <title>"Git: Easy way to setup a private remote repository" by Jon Gretar</title>
      <description>&lt;p&gt;Call me old fashioned&amp;#8230;. But I still haven&amp;#8217;t found any reason for why I should move to git from Subversion. I have no need for local repos since I&amp;#8217;m always network connected. The easy branching would be nice but really isn&amp;#8217;t a must for me. But I would miss all the tools that would be missing.&lt;/p&gt;


	&lt;p&gt;And I keep hearing about how amazing it is to have many repositarys for the code. But I haven&amp;#8217;t really heard why it would be an advantage. Unless you have 20+ developers on the project working on the same code. And that&amp;#8217;s not common.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:32:01 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d72d7f92-a3bb-4f2f-8303-6d062e8974e5</guid>
      <link>http://www.rubynaut.net/articles/2008/03/04/git-easy-way-to-setup-a-private-remote-repository#comment-2022</link>
    </item>
  </channel>
</rss>
