https://wiki.gnuradio.org/index.php?title=DevelopingWithGit&feed=atom&action=historyDevelopingWithGit - Revision history2024-03-28T17:18:57ZRevision history for this page on the wikiMediaWiki 1.39.5https://wiki.gnuradio.org/index.php?title=DevelopingWithGit&diff=715&oldid=prevDevnulling: Fix formatting - html entities2017-03-21T01:07:24Z<p>Fix formatting - html entities</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:07, 21 March 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l8">Line 8:</td>
<td colspan="2" class="diff-lineno">Line 8:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Creating your local repository of GNU Radio ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Creating your local repository of GNU Radio ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>First, head over to the github repository of GNU Radio at https://github.com/gnuradio/gnuradio, and click the <del style="font-weight: bold; text-decoration: none;">&quot;</del>fork<del style="font-weight: bold; text-decoration: none;">&quot; </del>button at the top. This will automatically create a repository in your github account, called <code>gnuradio</code>. You basically have a copy of the official repository, but you can write to this one.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>First, head over to the github repository of GNU Radio at https://github.com/gnuradio/gnuradio, and click the <ins style="font-weight: bold; text-decoration: none;">"</ins>fork<ins style="font-weight: bold; text-decoration: none;">" </ins>button at the top. This will automatically create a repository in your github account, called <code>gnuradio</code>. You basically have a copy of the official repository, but you can write to this one.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Clone the repository ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Clone the repository ===</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Before you can do anything, you need the repository on your local hard drive (<del style="font-weight: bold; text-decoration: none;">&quot;</del>cloning<del style="font-weight: bold; text-decoration: none;">&quot;</del>).<br /></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Before you can do anything, you need the repository on your local hard drive (<ins style="font-weight: bold; text-decoration: none;">"</ins>cloning<ins style="font-weight: bold; text-decoration: none;">"</ins>).<br /></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>github will tell you the correct URL, most likely, it's something like this:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>github will tell you the correct URL, most likely, it's something like this:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l24">Line 24:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>First, you need to set up an identity:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>First, you need to set up an identity:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><pre>$ git config user.name <del style="font-weight: bold; text-decoration: none;">&quot;</del>Your Name<del style="font-weight: bold; text-decoration: none;">&quot;</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><pre>$ git config user.name <ins style="font-weight: bold; text-decoration: none;">"</ins>Your Name<ins style="font-weight: bold; text-decoration: none;">"</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>$ git config user.email your@email.abc</pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>$ git config user.email your@email.abc</pre></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On github, you also need to set up an SSH key; github has excellent documentation on how to do that.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On github, you also need to set up an SSH key; github has excellent documentation on how to do that.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l86">Line 86:</td>
<td colspan="2" class="diff-lineno">Line 86:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># On branch heisencomp</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># On branch heisencomp</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Untracked files:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Untracked files:</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div># (use <del style="font-weight: bold; text-decoration: none;">&quot;</del>git add ...<del style="font-weight: bold; text-decoration: none;">&quot; </del>to include in what will be committed)</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># (use <ins style="font-weight: bold; text-decoration: none;">"</ins>git add ...<ins style="font-weight: bold; text-decoration: none;">" </ins>to include in what will be committed)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># heisenberg.c</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># heisenberg.c</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>nothing added to commit but untracked files present (use <del style="font-weight: bold; text-decoration: none;">&quot;</del>git add<del style="font-weight: bold; text-decoration: none;">&quot; </del>to track)</pre></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>nothing added to commit but untracked files present (use <ins style="font-weight: bold; text-decoration: none;">"</ins>git add<ins style="font-weight: bold; text-decoration: none;">" </ins>to track)</pre></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>So, there's a new file but git doesn't know what to do with it. So, you add it to your repository:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>So, there's a new file but git doesn't know what to do with it. So, you add it to your repository:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l125">Line 125:</td>
<td colspan="2" class="diff-lineno">Line 125:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Fork your repo off of our gnuradio repo, then create a remote branch on github with your changes</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Fork your repo off of our gnuradio repo, then create a remote branch on github with your changes</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Go onto the github site, visit your repository</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Go onto the github site, visit your repository</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div># There's a <del style="font-weight: bold; text-decoration: none;">&quot;</del>Pull Request<del style="font-weight: bold; text-decoration: none;">&quot; </del>button that will do all the work for you.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># There's a <ins style="font-weight: bold; text-decoration: none;">"</ins>Pull Request<ins style="font-weight: bold; text-decoration: none;">" </ins>button that will do all the work for you.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Tell us about your branch ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Tell us about your branch ===</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l145">Line 145:</td>
<td colspan="2" class="diff-lineno">Line 145:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Converting From Old Subversion Repository to the New Git Repository ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Converting From Old Subversion Repository to the New Git Repository ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The subversion imported commits have the revision number at the end of the description in the <del style="font-weight: bold; text-decoration: none;">&quot;</del>git-svn-id<del style="font-weight: bold; text-decoration: none;">&quot; </del>line. For example, you can create and checkout a new branch with svn revision 10184 by doing the following.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The subversion imported commits have the revision number at the end of the description in the <ins style="font-weight: bold; text-decoration: none;">"</ins>git-svn-id<ins style="font-weight: bold; text-decoration: none;">" </ins>line. For example, you can create and checkout a new branch with svn revision 10184 by doing the following.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Find the commit hash from the git-svn-id.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Find the commit hash from the git-svn-id.</div></td></tr>
<!-- diff cache key mediawiki:diff::1.12:old-665:rev-715 -->
</table>Devnullinghttps://wiki.gnuradio.org/index.php?title=DevelopingWithGit&diff=665&oldid=prevMurrayThomson123: Removed: {{>toc}}2017-03-20T12:09:54Z<p>Removed: {{>toc}}</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:09, 20 March 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Using Git for GNU Radio development =</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Using Git for GNU Radio development =</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{&gt;toc}}</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Git makes it easier for anyone to develop and contribute code to gnuradio. This article will describe how to use git with multiple repositiories so you can develop and publish your changes to gnuradio. The goal of this page is to help people manage git repositories so code may easily be shared among GNU Radio developers.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Git makes it easier for anyone to develop and contribute code to gnuradio. This article will describe how to use git with multiple repositiories so you can develop and publish your changes to gnuradio. The goal of this page is to help people manage git repositories so code may easily be shared among GNU Radio developers.</div></td></tr>
<!-- diff cache key mediawiki:diff::1.12:old-35:rev-665 -->
</table>MurrayThomson123https://wiki.gnuradio.org/index.php?title=DevelopingWithGit&diff=35&oldid=prevMbr0wn: Imported from Redmine2017-03-08T01:36:14Z<p>Imported from Redmine</p>
<p><b>New page</b></p><div>= Using Git for GNU Radio development =<br />
<br />
{{&gt;toc}}<br />
<br />
Git makes it easier for anyone to develop and contribute code to gnuradio. This article will describe how to use git with multiple repositiories so you can develop and publish your changes to gnuradio. The goal of this page is to help people manage git repositories so code may easily be shared among GNU Radio developers.<br />
<br />
The basic idea is you clone the gnuradio git repository and maintain a public repository with your work on github, or other public git server.<br /><br />
In these examples, we will assume you are using github (with user name USER), as it is the most popular among GNU Radio developers. Also, we host a mirror of the main repository on github, so this is really, really simple.<br />
<br />
== Creating your local repository of GNU Radio ==<br />
<br />
First, head over to the github repository of GNU Radio at https://github.com/gnuradio/gnuradio, and click the &quot;fork&quot; button at the top. This will automatically create a repository in your github account, called <code>gnuradio</code>. You basically have a copy of the official repository, but you can write to this one.<br />
<br />
=== Clone the repository ===<br />
<br />
Before you can do anything, you need the repository on your local hard drive (&quot;cloning&quot;).<br /><br />
github will tell you the correct URL, most likely, it's something like this:<br />
<br />
<pre>$ git clone --recursive https://github.com/USER/gnuradio.git</pre><br />
If you don't want to use github, you can directly clone the GNU Radio repository, but you won't be able to use some very useful features of github, such as pull requests:<br />
<br />
<pre>$ git clone --recursive https://github.com/gnuradio/gnuradio.git</pre><br />
=== Setting up git ===<br />
<br />
If you haven't done so yet, git needs some configuring.<br /><br />
First, you need to set up an identity:<br />
<br />
<pre>$ git config user.name &quot;Your Name&quot;<br />
$ git config user.email your@email.abc</pre><br />
On github, you also need to set up an SSH key; github has excellent documentation on how to do that.<br />
<br />
=== Adding remotes ===<br />
<br />
A remote is a location of a repository.<br /><br />
You can get a list of remotes with the command<br />
<br />
<pre>$ git remote -v<br />
origin https://github.com/USER/gnuradio.git (fetch)<br />
origin https://github.com/USER/gnuradio.git (push)</pre><br />
You need at least one more remote, for tracking the changes to the main repository:<br />
<br />
<pre>$ git remote add upstream git://github.com/gnuradio/gnuradio.git<br />
$ git remote -v<br />
origin https://github.com/USER/gnuradio.git (fetch)<br />
origin https://github.com/USER/gnuradio.git (push)<br />
upstream git://github.com/gnuradio/gnuradio.git (fetch)<br />
upstream git://github.com/gnuradio/gnuradio.git (push)</pre><br />
=== Using Someone Else's Remote Branch ===<br />
<br />
Just in case this wasn't clear from the previous section:<br /><br />
As a collaboration tool, git can set up what's known as a remote to connect to other people's repositories. These repos, in the git distributed system, do not need to be on a single server, but can be anywhere.<br />
<br />
Now, someone might be doing something interesting you care about. Say this is Tom Rondeau and you want to track his work:<br />
<br />
<pre>$ git remote add trondeau git://github.com/trondeau/gnuradio.git<br />
$ git fetch --all # This downloads all available content<br />
$ git branch -r # Lists remote branches</pre><br />
== Setting up tracking branches ==<br />
<br />
Say you want to work off the <code>next</code> branch. First, you need a copy of that in your local repository -- a tracking branch:<br />
<br />
<pre>$ git fetch --all # This downloads all available content<br />
$ git branch -r # Lists remote branches</pre><br />
You can see that github already copied the next branch remotely. So, create a local tracking branch called next from the remote branch called origin/next:<br />
<br />
<pre>$ git checkout --track -b next origin/next</pre><br />
'''Important: Never, ever commit (write) to a local tracking branch. Always use them as a base to branch off!'''<br />
<br />
== Updates ==<br />
<br />
To make sure your tracking branches are up-to-date:<br />
<br />
<pre>$ git checkout master # Switch to branch you want to update<br />
$ git pull upstream master # Download the newest code from our repository</pre><br />
Do this anytime you start working on something.<br />
<br />
== Branching and adding own stuff ==<br />
<br />
Whenever you want to work on something, create a branch for it. Say you want to implement a Heisenberg compensator into the master branch:<br />
<br />
<pre>$ git checkout master # Go to our starting branch<br />
$ git pull upstream master # Update<br />
$ git checkout -b heisencomp # Create new branch from current branch (master)</pre><br />
Now, you can edit a new file with the fantastic code.<br /><br />
A very useful command to figure out the state of your repository is<br />
<br />
<pre>$ git status<br />
# On branch heisencomp<br />
# Untracked files:<br />
# (use &quot;git add ...&quot; to include in what will be committed)<br />
#<br />
# heisenberg.c<br />
nothing added to commit but untracked files present (use &quot;git add&quot; to track)</pre><br />
So, there's a new file but git doesn't know what to do with it. So, you add it to your repository:<br />
<br />
<pre>$ git add heisenberg.c # Marks all files that go into the following commit<br />
$ git commit -m 'core: Added a Heisenberg compensator' # Commits the changes</pre><br />
=== Upload your changes ===<br />
<br />
Your commit is only locally available now. You must manually copy this to your repository:<br />
<br />
<pre>$ git push origin heisencomp</pre><br />
Which will create a new remote branch with a copy of your local branch.<br />
<br />
=== Deleting branches ===<br />
<br />
When you are done with the branch, delete it locally, and on the remote repository (if needed):<br />
<br />
To delete your branch locally:<br />
<br />
<pre>$ git branch -d heisencomp</pre><br />
To delete your branch from the server:<br />
<br />
<pre>$ git push origin :heisencomp # If you think this is a weird syntax, you're not alone</pre><br />
== Git Graphical Browsing Tools ==<br />
<br />
There are some of the git graphical browsing tools such as gitk and qgit. The '''gitk''' is the original TCL/TK GUI for browsing history of Git repositories. The '''qgit''' is a QT GUI for browsing history of Git repositories, similar to gitk but with more features. '''tig''' is a curses-based GUI.<br />
<br />
== Publishing (upstreaming) your code ==<br />
<br />
The most important part of the code sharing process is contributing your changes back upstream.<br />
<br />
=== Pull requests ===<br />
<br />
If you're on github, this is the easiest way:<br />
<br />
# Fork your repo off of our gnuradio repo, then create a remote branch on github with your changes<br />
# Go onto the github site, visit your repository<br />
# There's a &quot;Pull Request&quot; button that will do all the work for you.<br />
<br />
=== Tell us about your branch ===<br />
<br />
If you have significant changes, you can simply email us (best way is by mailing list) and tell us about your code. All we need is the link to your remote branch.<br />
<br />
=== Submitting and applying patches ===<br />
<br />
Small stuff, bug fixes (and attachments for the issue tracker!) comes in the form of patches.<br /><br />
Going back to the previous example:<br />
<br />
<pre>$ git format-patch HEAD~<br />
0001-core-Added-a-Heisenberg-compensator.patch</pre><br />
This makes a patch for the latest commit and displays the file name. You can send this patch via email, or upload it to the issue tracker.<br />
<br />
Someone else can apply this patch in his repository using<br />
<br />
<pre>git apply FILENAME.patch</pre><br />
== Converting From Old Subversion Repository to the New Git Repository ==<br />
<br />
The subversion imported commits have the revision number at the end of the description in the &quot;git-svn-id&quot; line. For example, you can create and checkout a new branch with svn revision 10184 by doing the following.<br />
<br />
# Find the commit hash from the git-svn-id.<br />
<br />
<pre> $ git log --grep=git-svn-id.*@10184</pre><br />
# Create and checkout a new branch named r10184 from the commit hash.<br />
<br />
<pre> $ git checkout -b r10184 cd7b07f0140ddff6</pre><br />
== Other Resources ==<br />
<br />
Some external resources that may be useful for learning/working with git:<br />
<br />
* http://www.gitready.com/<br />
<br />
* http://git.or.cz/course/svn.html<br />
<br />
* http://git-scm.com/<br />
<br />
* http://git.or.cz/gitwiki/GitCheatSheet</div>Mbr0wn