https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&feed=atom&action=history
Developer Area/Switching Git from 'master' to 'main' for the default branch - Revision history
2024-03-29T06:30:53Z
Revision history for this page on the wiki
MediaWiki 1.35.10
https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&diff=12360&oldid=prev
Anitsirk: /* Change your local setup to point to the new branch */
2021-10-14T07:16:56Z
<p><span dir="auto"><span class="autocomment">Change your local setup to point to the new branch</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" 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-GB">
<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 07:16, 14 October 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l21" >Line 21:</td>
<td colspan="2" class="diff-lineno">Line 21:</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 branch -u origin/main</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 branch -u origin/main</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></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></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;">For good measure, run </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;"> git pull</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-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><ins style="font-weight: bold; text-decoration: none;">once done just to get the latest code.</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;"></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;"></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>==Update the Gerrit hook==</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>==Update the Gerrit hook==</div></td></tr>
<!-- diff cache key maharawikidb-mediawiki-:diff::1.12:old-12358:rev-12360 -->
</table>
Anitsirk
https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&diff=12358&oldid=prev
Anitsirk: /* Update the Gerrit hook */
2021-10-14T02:03:19Z
<p><span dir="auto"><span class="autocomment">Update the Gerrit hook</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" 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-GB">
<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 02:03, 14 October 2021</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>==Update the Gerrit hook==</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>==Update the Gerrit hook==</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;"></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;"></td></tr>
<tr><td class='diff-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 class="diffchange diffchange-inline">. </del>Open the file 'post-checkout' in '.git/hooks'.</div></td><td class='diff-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># Open the file 'post-checkout' in '.git/hooks'.</div></td></tr>
<tr><td class='diff-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 class="diffchange diffchange-inline">. </del>Find 'master' and change it to 'main'.</div></td><td class='diff-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># Find 'master' and change it to 'main'.</div></td></tr>
<tr><td class='diff-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 class="diffchange diffchange-inline">. </del>Save the file.</div></td><td class='diff-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># Save the file.</div></td></tr>
</table>
Anitsirk
https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&diff=12357&oldid=prev
Anitsirk: Anitsirk moved page Developer Area/Switching Git from from 'master' to 'main' for the default branch to Developer Area/Switching Git from 'master' to 'main' for the default branch without leaving a redirect
2021-10-14T02:02:40Z
<p>Anitsirk moved page <a href="/index.php?title=Developer_Area/Switching_Git_from_from_%27master%27_to_%27main%27_for_the_default_branch&action=edit&redlink=1" class="new" title="Developer Area/Switching Git from from 'master' to 'main' for the default branch (page does not exist)">Developer Area/Switching Git from from 'master' to 'main' for the default branch</a> to <a href="/wiki/Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch" title="Developer Area/Switching Git from 'master' to 'main' for the default branch">Developer Area/Switching Git from 'master' to 'main' for the default branch</a> without leaving a redirect</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" 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-GB">
<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 02:02, 14 October 2021</td>
</tr>
<!-- diff cache key maharawikidb-mediawiki-:diff::1.12:old-12356:rev-12357 -->
</table>
Anitsirk
https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&diff=12356&oldid=prev
Anitsirk: Anitsirk moved page Developer Area/Switching Git branches from 'master' to 'main' to Developer Area/Switching Git from from 'master' to 'main' for the default branch without leaving a redirect
2021-10-14T02:02:21Z
<p>Anitsirk moved page <a href="/index.php?title=Developer_Area/Switching_Git_branches_from_%27master%27_to_%27main%27&action=edit&redlink=1" class="new" title="Developer Area/Switching Git branches from 'master' to 'main' (page does not exist)">Developer Area/Switching Git branches from 'master' to 'main'</a> to <a href="/index.php?title=Developer_Area/Switching_Git_from_from_%27master%27_to_%27main%27_for_the_default_branch&action=edit&redlink=1" class="new" title="Developer Area/Switching Git from from 'master' to 'main' for the default branch (page does not exist)">Developer Area/Switching Git from from 'master' to 'main' for the default branch</a> without leaving a redirect</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" 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-GB">
<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 02:02, 14 October 2021</td>
</tr>
<!-- diff cache key maharawikidb-mediawiki-:diff::1.12:old-12355:rev-12356 -->
</table>
Anitsirk
https://wiki.mahara.org/index.php?title=Developer_Area/Switching_Git_from_%27master%27_to_%27main%27_for_the_default_branch&diff=12355&oldid=prev
Anitsirk: Created page with "On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few..."
2021-10-14T02:01:43Z
<p>Created page with "On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few..."</p>
<p><b>New page</b></p><div>On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few changes so as to push code correctly to Gerrit.<br />
<br />
== Change your local setup to point to the new branch==<br />
<br />
The following instructions are taken from '[https://www.git-tower.com/learn/git/faq/git-rename-master-to-main/ How to change your master branch to main in Git]<br />
<br />
<pre><br />
# Switch to the "master" branch:<br />
$ git checkout master<br />
<br />
# Rename it to "main":<br />
$ git branch -m master main<br />
<br />
# Get the latest commits (and branches!) from the remote:<br />
$ git fetch<br />
<br />
# Remove the existing tracking connection with "origin/master":<br />
$ git branch --unset-upstream<br />
<br />
# Create a new tracking connection with the new "origin/main" branch:<br />
$ git branch -u origin/main<br />
</pre><br />
<br />
==Update the Gerrit hook==<br />
<br />
#. Open the file 'post-checkout' in '.git/hooks'.<br />
#. Find 'master' and change it to 'main'.<br />
#. Save the file.</div>
Anitsirk