<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Git failed to push some refs &#8211; the multiple branch variant</title>
	<atom:link href="http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/feed/" rel="self" type="application/rss+xml" />
	<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/</link>
	<description></description>
	<lastBuildDate>Mon, 19 Dec 2011 02:06:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Seth Milliken</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-653</link>
		<dc:creator><![CDATA[Seth Milliken]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 20:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-653</guid>
		<description><![CDATA[For whatever reason, by default &lt;code&gt;git push&lt;/code&gt; pushes to &lt;em&gt;all&lt;/em&gt; branches on the remote. To set this to the default that you&#039;re expecting (and that really seems the only sane and reasonable default to me, but I digress), you can use &lt;code&gt;git config remote.origin.push HEAD&lt;/code&gt;. But meanwhile, since you may wind up using git from other machines and forget that the default behavior is broken, you should probably always just specify the remote and branch explicitly.

So, using your example here, you would use:
&lt;pre&gt;
git push origin fetch-flow
&lt;/pre&gt;

The problem with this is that if you mistype your branch, you could wind up creating a new branch on the remote with the typo, e.g. something like &lt;code&gt;fletch-flow&lt;/code&gt;. So that brings us to what is likely the best &lt;code&gt;git push&lt;/code&gt; habit to get into:

&lt;pre&gt;
git push origin HEAD
&lt;/pre&gt;

This will push &lt;em&gt;only&lt;/em&gt; the current branch to a branch of the same name on the remote.

Hope this helps. This is all in the &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/git-push.html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;git push&lt;/code&gt; docs&lt;/a&gt;, but it really isn&#039;t very clearly or prominently presented.]]></description>
		<content:encoded><![CDATA[<p>For whatever reason, by default <code>git push</code> pushes to <em>all</em> branches on the remote. To set this to the default that you&#8217;re expecting (and that really seems the only sane and reasonable default to me, but I digress), you can use <code>git config remote.origin.push HEAD</code>. But meanwhile, since you may wind up using git from other machines and forget that the default behavior is broken, you should probably always just specify the remote and branch explicitly.</p>
<p>So, using your example here, you would use:</p>
<pre>
git push origin fetch-flow
</pre>
<p>The problem with this is that if you mistype your branch, you could wind up creating a new branch on the remote with the typo, e.g. something like <code>fletch-flow</code>. So that brings us to what is likely the best <code>git push</code> habit to get into:</p>
<pre>
git push origin HEAD
</pre>
<p>This will push <em>only</em> the current branch to a branch of the same name on the remote.</p>
<p>Hope this helps. This is all in the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html" rel="nofollow"><code>git push</code> docs</a>, but it really isn&#8217;t very clearly or prominently presented.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ljohnston</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-628</link>
		<dc:creator><![CDATA[ljohnston]]></dc:creator>
		<pubDate>Tue, 26 Oct 2010 21:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-628</guid>
		<description><![CDATA[Interesting. Thanks for the update. Yes, that is a confusing error...]]></description>
		<content:encoded><![CDATA[<p>Interesting. Thanks for the update. Yes, that is a confusing error&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kkrugler</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-626</link>
		<dc:creator><![CDATA[kkrugler]]></dc:creator>
		<pubDate>Tue, 26 Oct 2010 03:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-626</guid>
		<description><![CDATA[Hi Lance,

I&#039;ve revised the post above to be more accurate - your push works, you just get a confusing error about the other branches that git tries to auto-push.

-- Ken]]></description>
		<content:encoded><![CDATA[<p>Hi Lance,</p>
<p>I&#8217;ve revised the post above to be more accurate &#8211; your push works, you just get a confusing error about the other branches that git tries to auto-push.</p>
<p>&#8211; Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ljohnston</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-625</link>
		<dc:creator><![CDATA[ljohnston]]></dc:creator>
		<pubDate>Mon, 25 Oct 2010 22:03:33 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-625</guid>
		<description><![CDATA[Thanks for the tip. Helped me get past this. However... really? This is the way git works? I work in a shop with several branches. Every time I want to push I&#039;ve really got to checkout each branch that&#039;s ahead of my repo and pull each one individually?]]></description>
		<content:encoded><![CDATA[<p>Thanks for the tip. Helped me get past this. However&#8230; really? This is the way git works? I work in a shop with several branches. Every time I want to push I&#8217;ve really got to checkout each branch that&#8217;s ahead of my repo and pull each one individually?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BillyJin</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-618</link>
		<dc:creator><![CDATA[BillyJin]]></dc:creator>
		<pubDate>Tue, 28 Sep 2010 04:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-618</guid>
		<description><![CDATA[Thank you for your artcle]]></description>
		<content:encoded><![CDATA[<p>Thank you for your artcle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tosha</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-543</link>
		<dc:creator><![CDATA[Tosha]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 14:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-543</guid>
		<description><![CDATA[Hey, thank you, that really helped, had some branches too, with the same problem on 2 branches. Fixed by your guide. Thanks once again!]]></description>
		<content:encoded><![CDATA[<p>Hey, thank you, that really helped, had some branches too, with the same problem on 2 branches. Fixed by your guide. Thanks once again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danone</title>
		<link>http://ken-blog.krugler.org/2010/02/25/git-failed-to-push-some-refs-the-multiple-branch-variant/#comment-530</link>
		<dc:creator><![CDATA[danone]]></dc:creator>
		<pubDate>Tue, 18 May 2010 15:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://ken-blog.krugler.org/?p=235#comment-530</guid>
		<description><![CDATA[Great! thanks.]]></description>
		<content:encoded><![CDATA[<p>Great! thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

