<?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>Ruby on Rails Outsourcing &#187; git</title>
	<atom:link href="http://www.ruby-on-rails-outsourcing.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ruby-on-rails-outsourcing.com</link>
	<description>Kirana Tama - Rails outsourcing company that helps small businesses minimize their costs</description>
	<lastBuildDate>Wed, 28 Jul 2010 05:58:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Git: Merging from Remote Branch</title>
		<link>http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/</link>
		<comments>http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 03:34:20 +0000</pubDate>
		<dc:creator>William Notowidagdo</dc:creator>
				<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.ruby-on-rails-outsourcing.com/?p=213</guid>
		<description><![CDATA[Here is the problem, you need to merge some works from &#8220;stable&#8221; branch in &#8220;repo1&#8243; to your current &#8220;master&#8221;  branch. Below are the steps you do.
First of all, add a remote repository
git remote add foo git@example.com:foo/repo1.git
then download objects and refs from that newly added remote repository
git fetch foo
now checkout the branch which will you [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the problem, you need to merge some works from &#8220;stable&#8221; branch in &#8220;repo1&#8243; to your current &#8220;master&#8221;  branch. Below are the steps you do.<br />
First of all, add a remote repository</p>
<pre class="brush: bash">git remote add foo git@example.com:foo/repo1.git</pre>
<p>then download objects and refs from that newly added remote repository</p>
<pre class="brush: bash">git fetch foo</pre>
<p>now checkout the branch which will you merge</p>
<pre class="brush: bash">git checkout --track -b stable foo/stable</pre>
<p>swith to &#8220;stable&#8221; branch and check that everything is good to go</p>
<pre class="brush: bash">git checkout stable</pre>
<p>then you move back to your current directory</p>
<pre class="brush: bash">git checkout master</pre>
<p>from this point, you can merge &#8220;stable&#8221; branch to your current &#8220;master&#8221; branch by using</p>
<pre class="brush: bash">git merge stable</pre>
<p>if the changes don&#8217;t conflict, you&#8217;re done. Alternatively, you can pick out individual commits from &#8220;repo1/stable&#8221; to your current branch by using</p>
<pre class="brush: bash">git cherry-pick refnumber</pre>
<p>Got better solutions? Please share it on the comments.</p>
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/&amp;title=Git%3A+Merging+from+Remote+Branch" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/&amp;title=Git%3A+Merging+from+Remote+Branch" rel="nofollow" class="external" title="Digg this!">Digg this!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/&amp;title=Git%3A+Merging+from+Remote+Branch" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/&amp;t=Git%3A+Merging+from+Remote+Branch" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://twitter.com/home?status=Git%3A+Merging+from+Remote+Branch+-+http://b2l.me/ftzjp+(via+@ptwgs)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?subject=%22Git%3A%20Merging%20from%20Remote%20Branch%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22Here%20is%20the%20problem%2C%20you%20need%20to%20merge%20some%20works%20from%20%22stable%22%20branch%20in%20%22repo1%22%20to%20your%20current%20%22master%22%20%20branch.%20Below%20are%20the%20steps%20you%20do.%0D%0AFirst%20of%20all%2C%20add%20a%20remote%20repository%0D%0Agit%20remote%20add%20foo%20git%40example.com%3Afoo%2Frepo1.git%0D%0Athen%20download%20objects%20and%20refs%20from%20that%20newly%20added%20remote%20reposi%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/&amp;title=Git%3A+Merging+from+Remote+Branch&amp;summary=Here%20is%20the%20problem%2C%20you%20need%20to%20merge%20some%20works%20from%20%22stable%22%20branch%20in%20%22repo1%22%20to%20your%20current%20%22master%22%20%20branch.%20Below%20are%20the%20steps%20you%20do.%0D%0AFirst%20of%20all%2C%20add%20a%20remote%20repository%0D%0Agit%20remote%20add%20foo%20git%40example.com%3Afoo%2Frepo1.git%0D%0Athen%20download%20objects%20and%20refs%20from%20that%20newly%20added%20remote%20reposi&amp;source=Ruby on Rails Outsourcing" rel="nofollow" class="external" title="Share this on Linkedin">Share this on Linkedin</a></li></ul><div style="clear:both;"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.ruby-on-rails-outsourcing.com/2010/02/08/git-merging-from-remote-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
