1. Git¶
We started FabAcademy by setting up an environment for weekly documentation.
This included learning about Git, Version control, and Web Development.
Since I am a total newbie to web development, I decided to use the beginner-friendly “Markdown” as my development language.
Assignments for this week (Jan 22-28):
1. Sketch potential Final Project ideas
2. Work through a git tutorial and build a personal website for documenting my FabAcademy journey
3. Update my site with this week’s documentation, my Profile page and Final project ideas
4. Read and sign the student agreement and commit it to my repository
1. Sketching a potential final project¶
Documented on the “Projects” section
2. Building a documentation website¶
To set up the website, we referred to our node (FabLab Kamakura)’s Git Tutorial to set up a Git Repository, securing it with an SSH key, then cloned the Git onto our local PC directory. I then updated the site with our profiles and Student Agreement, and pushed and commited the changes.
1. Set up a Git Repository¶
What is Git?
It’s basically a free and open-sourced tool to help us manage code and track all the different versions. It’s the most popular such system in the world, and is considered the standard for software development. - Code Institute
This introductory video helped me get familiarised with its basic concepts.
- To set up Git, first I installed VS Code as my text editor and terminal app.
- I then installed Git Bash as my command line interface, which is a tool for my PC to talk to and execute commands on GitLab.
- Once installed, I checked git’s version and completed the configuration by typing below on Git Bash.
git --version<br>
git config --global user.name "Midori"<br>
git config --global user.email "my email"
2. Generate an SSH key¶
An SSH key in Git is a cryptographic key pair used to securely authenticate our local machine when connecting to a remote Git repository (like GitHub) without needing to enter a password each time, essentially acting as a secure login method for our computer to access the repository over the SSH protocol. - Atlassian
Steps for generating an SSH key
In order to generate an SSH key, first, I checked that I don't already have one, by typing below on my Git Bash.`cat ~/.ssh/id_rsa.pub`
Checking that I did not have any, I generated a key by typing below.
`ssh-keygen -t rsa -C “my email”`
Next, I was asked to enter a passphrase, which I entered (regretfully). Given the amount of pushing I will be doing in FabAcademy, I should have kept this step passphrase-free. Next, to retrieve the Public key (the .pub file) that was generated, I typed below.
`cat ~/.ssh/id_rsa.pub`
To delete the passphrase in the SSH key, type below in Git Bash:
ssh-keygen -f ~/.ssh/id_rsa.pub -p
Then Enter the old passphrase, followed by the new passphrase two times.
The SSH key will look like this (greyed out in the picture, as the key should never be made public)
I copied this key and copied it to my GitLab by pasting it onto my Gitlab User Settings -> SSH key.
3. Clone the git repository onto my PC¶
First, I created a folder on my PC to use as my local repository.
Then on Git Bash, I navigated to the folder I made, using the “cd” command.
In order to clone my repository to this folder, I went to my GitLab repository and selected “Clone with SSH”.
git clone git@gitlab.fabcloud.org:academany/fabacademy/2025/labs/kamakura/students/midori-kurokawa.git
I pasted this onto Git Bash.
I opened my repositry over on VS code, and checked that all the contents are displayed correctly.
4. Update my site¶
For my web-development language, after trying both HTML and Markdown, I chose Markdown for its simplicity and speed.
What is Markdown?
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John > Gruber in 2004, Markdown is now one of the world’s most popular markup languages. - markdownguide.org
Setting up my VS Code for MKDocs
First, I changed my VS Code’s terminal to Git Bash, so it’s easy to update my code.
I decided to use MKDocs as my static site generator.
I downloaded the student template for MkDocs (https://gitlab.fabcloud.org/academany/fabacademy/templates/student-template-mkdocs), and replaced all the contents of my local repository with the above template.
I then updated my profile page, and also added my initial project ideas to the Project section.
Finally, we can update the site, by pushing and committing the changes to GitLab. We do this by typing below commands:
・git pull #This updates my local repository with latest changes in remote repository (= GitLab)
・git add #This addd the local changes to the staging area for pushing onto the remote repository
・git commit -m "message" #Registers the changes, with a message to explain what I changed
・git push #Sends the registered local changes to the remote repository
※ Remember that the git push limit for FabAcademy is 10MB per push!
Finally, I tested the website and confirmed that all the contents were displayed properly.
5. Commit the Agreement¶
Finally, on my VS Code, I updated “Agreement.md” with the latest Agreement, signed my name, and pushed it.
Assignment Checklists:¶
- [x] Sketched my final project ideas
- [x] Described briefly what it will do and who will use it
- [x] Made a website and described how I did it
- [x] Created a section about myself on that website
- [x] Added a page with my sketch and description of my final project ideas
- [x] Documented steps for setting up my Git repository and adding files to it
- [x] Pushed to my class GitLab repository
- [x] Signed and uploaded Student Agreement
Useful links:¶
Git
- Pro Git book
- Oh Shit, Git!?!
- git commands
- Julian’s Recitation slides
Markdown
- Basic syntax
- https://zenn.dev/mebiusbox/articles/81d977a72cee01
- https://www.mkdocs.org/user-guide/writing-your-docs/
- https://zenn.dev/shotakaha/scraps/1aab3983e63624