<divid="unreleased-message"> You are reading an old version of the documentation (v2.0.0). For the latest version see <ahref="https://matplotlib.org/stable/devel/gitwash/set_up_fork.html">https://matplotlib.org/stable/devel/gitwash/set_up_fork.html</a></div>
<spanid="set-up-fork"></span><h1>Set up your fork<aclass="headerlink" href="#set-up-your-fork" title="Permalink to this headline">¶</a></h1>
<p>First you follow the instructions for <aclass="reference internal" href="forking_hell.html#forking"><spanclass="std std-ref">Making your own copy (fork) of matplotlib</span></a>.</p>
<divclass="section" id="overview">
<h2>Overview<aclass="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
<li><pclass="first">Investigate. Change directory to your new repo: <codeclass="docutils literal"><spanclass="pre">cd</span><spanclass="pre">matplotlib</span></code>. Then
<codeclass="docutils literal"><spanclass="pre">git</span><spanclass="pre">branch</span><spanclass="pre">-a</span></code> to show you all branches. You’ll get something
<p>This tells you that you are currently on the <codeclass="docutils literal"><spanclass="pre">master</span></code> branch, and
that you also have a <codeclass="docutils literal"><spanclass="pre">remote</span></code> connection to <codeclass="docutils literal"><spanclass="pre">origin/master</span></code>.
What remote repository is <codeclass="docutils literal"><spanclass="pre">remote/origin</span></code>? Try <codeclass="docutils literal"><spanclass="pre">git</span><spanclass="pre">remote</span><spanclass="pre">-v</span></code> to
see the URLs for the remote. They will point to your <aclass="reference external" href="https://github.com">github</a> fork.</p>
<p>Now you want to connect to the upstream <aclass="reference external" href="https://github.com/matplotlib/matplotlib">matplotlib github</a> repository, so
<spanid="linking-to-upstream"></span><h3>Linking your repository to the upstream repo<aclass="headerlink" href="#linking-your-repository-to-the-upstream-repo" title="Permalink to this headline">¶</a></h3>
<p><codeclass="docutils literal"><spanclass="pre">upstream</span></code> here is just the arbitrary name we’re using to refer to the
main <aclass="reference external" href="http://matplotlib.org">matplotlib</a> repository at <aclass="reference external" href="https://github.com/matplotlib/matplotlib">matplotlib github</a>.</p>
<p>Note that we’ve used <codeclass="docutils literal"><spanclass="pre">git://</span></code> for the URL rather than <codeclass="docutils literal"><spanclass="pre">git@</span></code>. The
<codeclass="docutils literal"><spanclass="pre">git://</span></code> URL is read only. This means that we can’t accidentally
(or deliberately) write to the upstream repo, and we are only going to
use it to merge into our own code.</p>
<p>Note this command needs to be run on every clone of the repository
that you make. It is not tracked in your personal repository on
<p>Just for your own satisfaction, show yourself that you now have a new
‘remote’, with <codeclass="docutils literal"><spanclass="pre">git</span><spanclass="pre">remote</span><spanclass="pre">-v</span></code>, giving you something like:</p>
<h3>Read-only remote / push access to <codeclass="docutils literal"><spanclass="pre">matplotlib/matplotlib</span></code><aclass="headerlink" href="#read-only-remote-push-access-to-matplotlib-matplotlib" title="Permalink to this headline">¶</a></h3>
<p>If you have commit rights to <codeclass="docutils literal"><spanclass="pre">matplotlib/matplotlib</span></code> the <codeclass="docutils literal"><spanclass="pre">git://</span></code>
protocol URL will still be read-only (due to it not supporting
authentication and restrictions on github’s side). To reduce the
chance of accidentally pushing to upstream, we suggest setting up a
read-only remote of upstream as above and a read/write remote as</p>