From ee16a829655cb96e1167f2fe37c99bc994970780 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D9=83=D8=A7=D8=B1=D9=84=20=D9=85=D8=A8=D8=A7=D8=B1=D9=83?=
branch
Branches are parallel dossiers: safe space for changes.
Edit the root index.html (and optionally add style.css, assets/).
Make a visible change first:
Then check changes:
git diff git status
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.
Push your commits to the server, defining a remote branch to track. This is called setting the upstream.
git push -u origin braids/<your-slug>
(Again, change <your-slug>!)
The first time you checkout from https://git.hackersanddesigners.nl the server will ask you for credentials. These will be remembered, so only once. -This pushes your branch to the 'origin' server.
From then on, unless the remote/branch is named, git push will go in that direction.
git pushdisabled push rights for now, only for demonstration purposes, will fail
Open the gallery:
Find your card:
Iterate:
edit -> status -> add -> commit -> push -> refresh
Wrong branch:
git branch +git commit -m "Add assets for <your-slug>"
Small commits win. One change = one deposit.
Push your commits to the server, defining a remote branch to track. This is called setting the upstream.
git push -u origin braids/<your-slug>
(Again, change <your-slug>!)
This pushes your branch to the 'origin' server.
The first time you push to https://git.hackersanddesigners.nl the server will ask you for credentials. These will be remembered, so only once.
From then on, unless the remote/branch is named, git push will go in that direction.
git pushdisabled push rights for now, only for demonstration purposes, will fail
Open the gallery:
Find your card:
Iterate:
edit -> status -> add -> commit -> push -> refresh
Wrong branch:
git branch git checkout braids/<your-slug>
Nothing staged:
git status -git add index.html
Push rejected (main protected):
Auth issues:
Bad:
Better:
Rule: message should still make sense in 6 months.
Title underline too short.
Optional: git pull +git add index.html
Push rejected (main protected):
Auth issues:
Bad:
Better:
Rule: message should still make sense in 6 months.
Title underline too short.
Optional: git pull =================
If you want to collaborate with others on the same branch, pull updates from server:
git pullDuring the exercise you mostly push your branch. -Pull is mainly for getting new changes on main (if needed).
fact: git pull is actually a git fetch && git merge
First, go ahead and git fetch --all branches from the remote git repository, so you have them locally.
Then git branch to see the available branches.
Check some of them out with git checkout braids/<branch_name>.
See something you like? Merge with them.
git checkout braids/<your-slug> -git merge braids/<chosen_branch>
Consolidate any merge conflicts manually if you have to. Then, stage, commit and push your changes to your branch.
Learn more:
End: remind participants their branches will be removed after the workshop.