<?xml version="1.0" encoding="UTF-8"?>
<guide>
  <body>&lt;p&gt;Github is all about sharing content, so at some point you&amp;#8217;ll be willing to push from your local git repository to github&amp;#8217;s. To push a local branch to your remote repository, do:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git push &amp;lt;remote_repository_name&amp;gt; &amp;lt;branch_name&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Examples:&lt;br /&gt;
Assuming you did &lt;code&gt;git clone git://github.com/you/your-project.git&lt;/code&gt;, hence &lt;code&gt;origin&lt;/code&gt; is the remote.&lt;br /&gt;
- pushing the branch &lt;code&gt;my_new_branch&lt;/code&gt; to your Github repos: &lt;code&gt;git push origin my_new_branch&lt;/code&gt;&lt;br /&gt;
- merging the branch &lt;code&gt;experiment&lt;/code&gt; into &lt;code&gt;master&lt;/code&gt; and push it:&lt;br /&gt;
&lt;code&gt;git checkout master&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;git merge experiment&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;git push origin master&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To remove a useless branch after merging and/or pushing, see &lt;a href=&quot;http://github.com/guides/remove-a-remote-branch&quot;&gt;Guide: Remove a remote branch&lt;/a&gt;.&lt;/p&gt;</body>
  <created-at type="datetime">2008-04-17T19:26:21-07:00</created-at>
  <id type="integer">40</id>
  <permalink>push-a-branch-to-github</permalink>
  <title>Push a Branch to GitHub</title>
  <updated-at type="datetime">2009-08-30T21:16:25-07:00</updated-at>
  <user-id type="integer">3300</user-id>
</guide>
