<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>上善若水 &#187; git</title>
	<atom:link href="http://iiiorz.net/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://iiiorz.net</link>
	<description>如果我不能死在一万个敌人的包围中，那就让我死在一万个美女的怀抱中吧</description>
	<lastBuildDate>Fri, 19 Nov 2010 04:05:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>我的git使用</title>
		<link>http://iiiorz.net/2009/10/%e6%88%91%e7%9a%84git%e4%bd%bf%e7%94%a8/</link>
		<comments>http://iiiorz.net/2009/10/%e6%88%91%e7%9a%84git%e4%bd%bf%e7%94%a8/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 07:04:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[混沌海]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://iiiorz.net/?p=65</guid>
		<description><![CDATA[我有租用DH服务器一台 开发用电脑，若干(地点不同) 主要是使用git来做好版本控制，并且同步各台电脑的代码 git就我一个人用，不支持多用户 1.在DreamHost建立git源 2.在本机 Initializing a repository 3.获得我的服务器源 4.用branch来记录每天的开发 我用了一个名字为steps的branch来记录和同步每天开发的代码，有了阶段性的成果后merge到master上面 搞定，散花！ 这样可以很好的利用git来做版本控制，并且还可以用它的branch来同步我项目中不同机子上面的代码。]]></description>
			<content:encoded><![CDATA[<p>我有租用DH服务器一台<br />
开发用电脑，若干(地点不同)<br />
主要是使用git来做好版本控制，并且同步各台电脑的代码<br />
git就我一个人用，不支持多用户</p>
<p>1.在DreamHost建立git源</p>
<pre class="brush: plain; title: ; notranslate">
$ mkdir git
$ cd git
$ git  --bare init
$ git  --bare update-server-info
$ chmod a+x hooks/post-update
$ touch git-daemon-export-ok
</pre>
<p>2.在本机 Initializing a repository</p>
<pre class="brush: plain; title: ; notranslate">
$ mkdir cola
$ cd cola

$ git init
$ git remote add origin ssh://USER@MACHINE.dreamhost.com/home/USER/git/cola.git
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master

$ touch README
$ git add .
$ git commit -m &quot;initial repository&quot;

$ git push --all
$ git pull
</pre>
<p>3.获得我的服务器源</p>
<pre class="brush: plain; title: ; notranslate">
$ git clone ssh://USER@MACHINE.dreamhost.com/home/USER/git/cola.git
</pre>
<p>4.用branch来记录每天的开发<br />
我用了一个名字为steps的branch来记录和同步每天开发的代码，有了阶段性的成果后merge到master上面</p>
<pre class="brush: plain; title: ; notranslate">
$ git branch steps
$ git push origin steps
$ git fetch origin
$ git checkout -b steps
</pre>
<p>搞定，散花！<br />
这样可以很好的利用git来做版本控制，并且还可以用它的branch来同步我项目中不同机子上面的代码。</p>
]]></content:encoded>
			<wfw:commentRss>http://iiiorz.net/2009/10/%e6%88%91%e7%9a%84git%e4%bd%bf%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

