more slug explanation

This commit is contained in:
Heerko 2026-01-09 17:26:26 +01:00
parent 88acf9b516
commit 96ec74bcea
2 changed files with 14 additions and 13 deletions

View file

@ -15,12 +15,12 @@ then do a little branch-based website exercise published live.</p></div></div><d
Use this when you are creating and working on your own projects.</p><pre class="highlight code bash">git<span class="w"> </span>init</pre><p>Creates a .git/ directory containing history + metadata.</p><div class="notes"><p>For the exercise we will use git clone instead of git init.</p></div></div><div class="step step-level-1" step="11" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="17600" data-y="0" data-z="0"><h1 id="command-git-clone">Command: git clone</h1><p>Cloen (copy) a repository in the current folder.</p><pre class="highlight code bash">git<span class="w"> </span>clone<span class="w"> </span>https://git.hackersanddesigners.nl/hrk/braids<span class="w"> </span>&lt;destination&gt;</pre><p>Downloads a repo from the web, complete with the full commit history and all changes.</p></div><div class="step step-level-1" step="12" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="19200" data-y="0" data-z="0"><h1 id="command-git-status-your-dashboard">Command: git status (your dashboard)</h1><pre class="highlight code bash">git<span class="w"> </span>status</pre><p>Shows:</p><ul><li>current branch</li><li>staged vs unstaged changes</li><li>untracked files</li></ul></div><div class="step step-level-1" step="13" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="20800" data-y="0" data-z="0"><h1 id="command-git-add-select-files">Command: git add (select files)</h1><p>Stage files for the next commit.</p><pre class="highlight code bash">git<span class="w"> </span>add<span class="w"> </span>index.html<span class="w">
</span>git<span class="w"> </span>add<span class="w"> </span>assets/</pre><p>Stage everything (use carefully):</p><pre class="highlight code bash">git<span class="w"> </span>add<span class="w"> </span>.</pre><div class="notes"><p>Staging is curatorial: select what belongs together.</p></div></div><div class="step step-level-1" step="14" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="22400" data-y="0" data-z="0"><h1 id="command-git-commit">Command: git commit</h1><pre class="highlight code bash">git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"Added name to my page"</span></pre><p>Good commit message pattern:</p><ul><li>What changed</li><li>Why it changed (reason/intent)</li><li>Scope stays small</li></ul></div><div class="step step-level-1" step="15" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="24000" data-y="0" data-z="0"><h1 id="command-git-log-inventory">Command: git log (inventory)</h1><pre class="highlight code bash">git<span class="w"> </span>log<span class="w"> </span>--oneline<span class="w"> </span>--graph</pre><p>Gives a quick "finding aid" of earlier commits. Press 'q' to exit.</p></div><div class="step step-level-1" step="16" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="25600" data-y="0" data-z="0"><h1 id="command-git-branch-and-git-checkout">Command: git branch and git checkout</h1><p>List branches:</p><pre class="highlight code bash">git<span class="w"> </span>branch</pre><p>Create a branch:</p><pre class="highlight code bash">git<span class="w"> </span>branch<span class="w"> </span>people/yourname</pre><p>Switch to branch:</p><pre class="highlight code bash">git<span class="w"> </span>checkout<span class="w"> </span>people/yourname</pre><p>Shortcut (create + switch):</p><pre class="highlight code bash">git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>people/yourname</pre><div class="notes"><p>Branches are parallel dossiers: safe space for changes.</p></div></div><div class="step step-level-1" step="17" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="27200" data-y="0" data-z="0"><h1 id="command-git-push-git-pull">Command: git push / git pull</h1><p>Push your branch to the server:</p><pre class="highlight code bash">git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin<span class="w"> </span>people/yourname</pre><p>Pull updates from server:</p><pre class="highlight code bash">git<span class="w"> </span>pull</pre><div class="notes"><p>During the exercise you mostly push your branch.
Pull is mainly for getting new changes on main (if needed).</p></div></div><div class="step step-level-1" step="18" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="28800" data-y="0" data-z="0"><h1 id="optional-git-rm">Optional: git rm</h1><p>Remove a tracked file and stage the removal:</p><pre class="highlight code bash">git<span class="w"> </span>rm<span class="w"> </span>old.html<span class="w">
</span>git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"Remove old page"</span></pre><p>For this workshop you probably will not need it.</p></div><div class="step step-level-1" step="19" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="30400" data-y="0" data-z="0"><h1 id="forgejo-what-we-use-today">Forgejo: what we use today</h1><ul><li>Forgejo is an open-source alternative to Github</li><li>Forgejo hosts the central repository (remote)</li><li>You will:
</span>git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"Remove old page"</span></pre><p>For this workshop you probably will not need it.</p></div><div class="step step-level-1" step="19" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="30400" data-y="0" data-z="0"><h1 id="forgejo-what-we-use-today">Forgejo: what we use today</h1><ul><li>Forgejo is an open-source alternative to Github</li><li>Forgejo hosts the central repository (remote)</li></ul><p>You will:
- create an account
- clone via HTTPS
- push your branch</li></ul><p>Share your username with us so we can add you as a collaborator</p><p>Rules for today:</p><ul><li>do NOT push to main</li><li>create your branch under people/&lt;slug&gt;</li></ul></div><div class="step step-level-1" step="20" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="32000" data-y="0" data-z="0"><h1 id="forgejo-account-setup">Forgejo: account setup</h1><ol><li>Create account at: git.hackersanddesigners.nl</li><li>Confirm you can sign in</li></ol><p>We will provide:</p><ul><li><a href="https://git.hackersanddesigners.nl/hrk/braids">https://git.hackersanddesigners.nl/hrk/braids</a></li><li>branch naming convention</li><li>live gallery URL: braids.hackersanddesigners.nl</li></ul></div><div class="step step-level-1" step="21" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="33600" data-y="0" data-z="0"><h1 id="exercise-overview">Exercise overview</h1><p>You will build a (deliberately) simple page:</p><ul><li>"Hi, I'm &#x2026;"</li><li>maybe a gif?</li><li>a link?</li><li>optional: background, glitter, bad taste encouraged</li></ul><p>Workflow loop:</p><p>clone -&gt; branch -&gt; edit -&gt; status -&gt; add -&gt; commit -&gt; push -&gt; view -&gt; iterate</p></div><div class="step step-level-1" step="22" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="35200" data-y="0" data-z="0"><h1 id="exercise-step-1-clone">Exercise: step 1 (clone)</h1><p>cd to a logical location in your computer, then:</p><pre class="highlight code bash">git<span class="w"> </span>clone<span class="w"> </span>https://git.hackersanddesigners.nl/hrk/braids<span class="w">
- push your branch</p><p>Share your username with us so we can add you as a collaborator</p><p>Rules for today:</p><ul><li>do NOT push to main</li><li>create your branch under people/&lt;your-slug&gt;</li></ul></div><div class="step step-level-1" step="20" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="32000" data-y="0" data-z="0"><h1 id="forgejo-account-setup">Forgejo: account setup</h1><ol><li>Create account at: git.hackersanddesigners.nl</li><li>Confirm you can sign in</li></ol><p>Resources:</p><ul><li><a href="https://git.hackersanddesigners.nl/hrk/braids">https://git.hackersanddesigners.nl/hrk/braids</a> - the repo we will be working in</li><li>live gallery URL: <a href="https://braids.hackersanddesigners.nl">https://braids.hackersanddesigners.nl</a></li><li>these slides: <a href="https://braids.hackersanddesigners.nl/slides">https://braids.hackersanddesigners.nl/slides</a></li></ul></div><div class="step step-level-1" step="21" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="33600" data-y="0" data-z="0"><h1 id="exercise-overview">Exercise overview</h1><p>You will build a (deliberately) simple page:</p><ul><li>"Hi, I'm &#x2026;"</li><li>maybe a gif?</li><li>a link?</li><li>optional: background, glitter, bad taste encouraged</li></ul><p>Workflow loop:</p><p>clone -&gt; branch -&gt; edit -&gt; status -&gt; add -&gt; commit -&gt; push -&gt; view -&gt; iterate</p></div><div class="step step-level-1" step="22" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="35200" data-y="0" data-z="0"><h1 id="exercise-step-1-clone">Exercise: step 1 (clone)</h1><p>cd to a logical location in your computer, then:</p><pre class="highlight code bash">git<span class="w"> </span>clone<span class="w"> </span>https://git.hackersanddesigners.nl/hrk/braids<span class="w">
</span><span class="nb">cd</span><span class="w"> </span>braids</pre><p>If everything went well, check the repo with:</p><pre class="highlight code bash">git<span class="w"> </span>status<span class="w">
</span>git<span class="w"> </span>branch</pre><p>The first time you checkout from <a href="https://git.hackersanddesigners.nl">https://git.hackersanddesigners.nl</a> the server will ask you for credentials. These will be remembered, so only once.</p></div><div class="step step-level-1" step="23" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="36800" data-y="0" data-z="0"><h1 id="exercise-step-2-create-your-branch">Exercise: step 2 (create your branch)</h1><p>Choose a slug: lowercase, no spaces. This can be your name or an alias. Example: change people/&lt;your-slug&gt; in the command below to people/alex.</p><pre class="highlight code bash">git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>people/&lt;your-slug&gt;</pre><p>Confirm:</p><pre class="highlight code bash">git<span class="w"> </span>status</pre></div><div class="step step-level-1" step="24" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="38400" data-y="0" data-z="0"><h1 id="exercise-step-3-edit-the-page">Exercise: step 3 (edit the page)</h1><p>Edit the root index.html (and optionally style.css, assets/).</p><p>Make a visible change first:</p><ul><li>Change the name to your name (or your alias)</li></ul><p>Then check changes:</p><pre class="highlight code bash">git<span class="w"> </span>diff<span class="w">
</span>git<span class="w"> </span>branch</pre><p>The first time you checkout from <a href="https://git.hackersanddesigners.nl">https://git.hackersanddesigners.nl</a> the server will ask you for credentials. These will be remembered, so only once.</p></div><div class="step step-level-1" step="23" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="36800" data-y="0" data-z="0"><h1 id="exercise-step-2-create-your-branch">Exercise: step 2 (create your branch)</h1><p>Choose a slug: lowercase, no spaces. This can be your name or an alias. Example: change people/&lt;your-slug&gt; in the command below to people/alex. From here on out replace &lt;your-slug&gt; with your chosen name.</p><pre class="highlight code bash">git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>people/&lt;your-slug&gt;</pre><p>Confirm:</p><pre class="highlight code bash">git<span class="w"> </span>status</pre></div><div class="step step-level-1" step="24" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="38400" data-y="0" data-z="0"><h1 id="exercise-step-3-edit-the-page">Exercise: step 3 (edit the page)</h1><p>Edit the root index.html (and optionally style.css, assets/).</p><p>Make a visible change first:</p><ul><li>Change the name to your name (or your alias)</li></ul><p>Then check changes:</p><pre class="highlight code bash">git<span class="w"> </span>diff<span class="w">
</span>git<span class="w"> </span>status</pre></div><div class="step step-level-1" step="25" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="40000" data-y="0" data-z="0"><h1 id="exercise-step-4-stage-commit">Exercise: step 4 (stage + commit)</h1><pre class="highlight code bash">git<span class="w"> </span>add<span class="w"> </span>index.html<span class="w">
</span>git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"Customize profile page for &lt;your-slug&gt;"</span></pre><p>If you added assets:</p><pre class="highlight code bash">git<span class="w"> </span>add<span class="w"> </span>assets/<span class="w">
</span>git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s2">"Add assets for &lt;your-slug&gt;"</span></pre><div class="notes"><p>Small commits win. One change = one deposit.</p></div></div><div class="step step-level-1" step="26" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="41600" data-y="0" data-z="0"><h1 id="exercise-step-5-push-your-branch">Exercise: step 5 (push your branch)</h1><pre class="highlight code bash">git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin<span class="w"> </span>people/&lt;your-slug&gt;</pre><p>(Again, change &lt;your-slug&gt;!)</p><p>If prompted for credentials, use your Forgejo login method.</p></div><div class="step step-level-1" step="27" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="43200" data-y="0" data-z="0"><h1 id="exercise-step-6-view-live">Exercise: step 6 (view live)</h1><p>Open the gallery:</p><ul><li>https://braids.hackersanddesigners.nl/</li></ul><p>Find your card:</p><ul><li>people/&lt;your-slug&gt;/</li></ul><p>Iterate:</p><p>edit -&gt; status -&gt; add -&gt; commit -&gt; push -&gt; refresh</p></div><div class="step step-level-1" step="28" data-rotate-x="0" data-rotate-y="0" data-rotate-z="0" data-scale="1" data-x="44800" data-y="0" data-z="0"><h1 id="common-problems-fast-fixes">Common problems (fast fixes)</h1><p>Wrong branch:</p><pre class="highlight code bash">git<span class="w"> </span>branch<span class="w">

View file

@ -333,17 +333,18 @@ Forgejo: what we use today
- Forgejo is an open-source alternative to Github
- Forgejo hosts the central repository (remote)
- You will:
- create an account
- clone via HTTPS
- push your branch
You will:
- create an account
- clone via HTTPS
- push your branch
Share your username with us so we can add you as a collaborator
Rules for today:
- do NOT push to `main`
- create your branch under `people/<slug>`
- create your branch under `people/<your-slug>`
----
@ -353,11 +354,11 @@ Forgejo: account setup
1. Create account at: `git.hackersanddesigners.nl`
2. Confirm you can sign in
We will provide:
Resources:
- https://git.hackersanddesigners.nl/hrk/braids
- branch naming convention
- live gallery URL: `braids.hackersanddesigners.nl`
- https://git.hackersanddesigners.nl/hrk/braids - the repo we will be working in
- live gallery URL: https://braids.hackersanddesigners.nl
- these slides: https://braids.hackersanddesigners.nl/slides
----
@ -401,7 +402,7 @@ The first time you checkout from https://git.hackersanddesigners.nl the server w
Exercise: step 2 (create your branch)
=====================================
Choose a slug: lowercase, no spaces. This can be your name or an alias. Example: change `people/<your-slug>` in the command below to `people/alex`.
Choose a slug: lowercase, no spaces. This can be your name or an alias. Example: change `people/<your-slug>` in the command below to `people/alex`. From here on out replace <your-slug> with your chosen name.
.. code-block:: bash