diff --git a/html_output/index.html b/html_output/index.html index 04a2c0d..f9d061f 100644 --- a/html_output/index.html +++ b/html_output/index.html @@ -15,12 +15,12 @@ then do a little branch-based website exercise published live.

git init

Creates a .git/ directory containing history + metadata.

For the exercise we will use git clone instead of git init.

Command: git clone

Cloen (copy) a repository in the current folder.

git clone https://git.hackersanddesigners.nl/hrk/braids <destination>

Downloads a repo from the web, complete with the full commit history and all changes.

Command: git status (your dashboard)

git status

Shows:

Command: git add (select files)

Stage files for the next commit.

git add index.html
 git add assets/

Stage everything (use carefully):

git add .

Staging is curatorial: select what belongs together.

Command: git commit

git commit -m "Added name to my page"

Good commit message pattern:

Command: git log (inventory)

git log --oneline --graph

Gives a quick "finding aid" of earlier commits. Press 'q' to exit.

Command: git branch and git checkout

List branches:

git branch

Create a branch:

git branch people/yourname

Switch to branch:

git checkout people/yourname

Shortcut (create + switch):

git checkout -b people/yourname

Branches are parallel dossiers: safe space for changes.

Command: git push / git pull

Push your branch to the server:

git push -u origin people/yourname

Pull updates from server:

git pull

During the exercise you mostly push your branch. Pull is mainly for getting new changes on main (if needed).

Optional: git rm

Remove a tracked file and stage the removal:

git rm old.html
-git commit -m "Remove old page"

For this workshop you probably will not need it.

Forgejo: what we use today

Forgejo: what we use today

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:

Forgejo: account setup

  1. Create account at: git.hackersanddesigners.nl
  2. Confirm you can sign in

We will provide:

Exercise overview

You will build a (deliberately) simple page:

Workflow loop:

clone -> branch -> edit -> status -> add -> commit -> push -> view -> iterate

Exercise: step 1 (clone)

cd to a logical location in your computer, then:

git clone https://git.hackersanddesigners.nl/hrk/braids
+- 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/<your-slug>

Forgejo: account setup

  1. Create account at: git.hackersanddesigners.nl
  2. Confirm you can sign in

Resources:

Exercise overview

You will build a (deliberately) simple page:

Workflow loop:

clone -> branch -> edit -> status -> add -> commit -> push -> view -> iterate

Exercise: step 1 (clone)

cd to a logical location in your computer, then:

git clone https://git.hackersanddesigners.nl/hrk/braids
 cd braids

If everything went well, check the repo with:

git status
-git branch

The first time you checkout from https://git.hackersanddesigners.nl the server will ask you for credentials. These will be remembered, so only once.

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.

git checkout -b people/<your-slug>

Confirm:

git status

Exercise: step 3 (edit the page)

Edit the root index.html (and optionally style.css, assets/).

Make a visible change first:

Then check changes:

git diff
+git branch

The first time you checkout from https://git.hackersanddesigners.nl the server will ask you for credentials. These will be remembered, so only once.

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. From here on out replace <your-slug> with your chosen name.

git checkout -b people/<your-slug>

Confirm:

git status

Exercise: step 3 (edit the page)

Edit the root index.html (and optionally style.css, assets/).

Make a visible change first:

Then check changes:

git diff
 git status

Exercise: step 4 (stage + commit)

git add index.html
 git commit -m "Customize profile page for <your-slug>"

If you added assets:

git add assets/
 git commit -m "Add assets for <your-slug>"

Small commits win. One change = one deposit.

Exercise: step 5 (push your branch)

git push -u origin people/<your-slug>

(Again, change <your-slug>!)

If prompted for credentials, use your Forgejo login method.

Exercise: step 6 (view live)

Open the gallery:

Find your card:

Iterate:

edit -> status -> add -> commit -> push -> refresh

Common problems (fast fixes)

Wrong branch:

git branch
diff --git a/slides.rst b/slides.rst
index 5b3fa17..f1c20cc 100644
--- a/slides.rst
+++ b/slides.rst
@@ -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/`
+- create your branch under `people/`
 
 ----
 
@@ -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/` in the command below to `people/alex`.
+Choose a slug: lowercase, no spaces. This can be your name or an alias. Example: change `people/` in the command below to `people/alex`. From here on out replace  with your chosen name.
 
 .. code-block:: bash