2. Project management

he first week of FabAcademy was very stressful for me. I have no experience with GIT, MkDocs, building websites or working from the command line.

The presentation from Neil about Version Control and GIT on Wednesday left me confused and stressed. The GIT workshop in De Waag the next day didn’t help to get rid of that feeling. I tried to keep up following the instructions. I did not know what I was doing or why. I just tried to keep notes, hoping they would help me later.

At the end of the day I really thought I was not fit for the FabAcademy. High information density, high pace, and all new subjects.

But at this point quitting is not an option.

The most important thing I learned

Don’t Panic! (And always keep a clean towel)

It won’t help, on the contrary.

Take more notes and document more.

In this first week it was hard for me to keep track. Not bvecaus of the pace but because of the new subject and lack of context. For instance furder on I write wat I did to generate the SSH Key, but I don’t know when you have to generate an SSH key.

What I learned about GIT so far

General idea behind GIT

GIT, as we use it, is a version control & archive application that you can also us to build a website. You work with GIT in a local repository. Changes you make, must be stored localy and also on a remote repository on a server.

Commandline commands

cd Go to the top directory
ls list all files in current directory
pwd shows current directory
cd changes directory
cd – go back to previous directory

SSH

I used the following lines, as instructed by Henk, to get SSH

git config –global user.name “Rinke”
git config –global user.email “example@me.com”

Just try

The day after the GIT workshop I used what I remembered were the most important commands in GIT and I was able to make some changes on my website.

5 Steps in GIT

I learned that the following 5 steps are important to synchonize the local and the remote repository.

The screenshots are not all taken in the same session, so the vary.

  1. Type: ‘cd fabacademyrinke-vancouwelaar’ This takes you (me) to the repository

  2. Type: ‘git pull’
    This compares the local repository version with server version

Type: ‘git status’. You see the files that are ready to be commited (green) and files that has to be added to be commited (red).

  1. Type: ‘git add .’‘ This labels files to be committed.

Type ‘git status’ This shows the files that are ready to be commited

  1. Type ‘git commit –m “message”’ This commits files to the repository

  2. Type ‘git push’ This synchronizes the local repository with the server repository

What could possibly go wrong?

Know where you are

A couple of times I tried to make changes but nothing happened because I was in a sub folder of the repository and not the repository itself.

Solution Check where you are:
pwd shows the current directory
cd takes to the top of the root
ls shows the content of the current directory

Mind the dots

It makes a great difference if you type git add or git add .

Solution Read the feedback on the command line and try again.

Use the same name

I tried to change a picture on my site, but after the 5 GIT steps nothing was changed.

Solution:
Remember: do the 5 steps, do not skip the first one! So start in the right directory: the repository and not in a subfolder. Then make sure the name of the image is the same as name used in the .md file. Do the other steps.

Resizing a picture

I wanted to change the avatar picture on the About part.
I took a picture and uploaded to my laptop.
It was to big so I resized it using the command line
Convert name.jpg 25% newname.jpg

Next time I will use Apple Preview to resize pictures

Rotating a picture

The Picture I used appeared horizontal in stead of vertical so I had to rotate the picture 45 degrees. I used de command Convert rotate 45 name.jpg newname.jpg After the 5 GIT steps… Remember to do the first step. Be in the repository

Placing a picture

Take a picture. Resize it to approximately 30 Kb. Give the picture a meaningful name, in this case schets auto.jpg Move the picture to a folder. In this case fabacademy/rinke-vancouwelaar/docs/images/week01

It is my assumption that the following line in the md-file will place the photo on my website: (../images/week01/schets auto.jpg)

Let’s try!

I did the 5 GIT steps, checked my site and …. No photo Lesson: wait for the site to refresh, and there it was! I did it.

Changing a picture

I was not satisfied with the size of the photo “schets auto”. So I resized it in Apple Preview. Then I did the pull > push steps but the photo was not resized on the website although all the git steps were ‘green’.

I decided to replace the photo schets auto.jpg by a new one in fabacademy/rinke-vancouwelaar/docs/images/week01

Strangely enough the picture on my site was not changed. Although the old photo was removed it still appeared on the site. Refreshing the site did not help.

I decided to replace the photo by better one with a new name. I adjusted the line in de md-file. Did the GIT steps and…Tada! This time it worked

Image magic

To edit photo’s I can use the following commands from ImageMagick

Removing index.md

I wanted to get rid of the first page of my site. “Hello new student … et cetera” doesn’t seem very relevant. I decided to remove the index.md file. I shouldn’t have done that! After de GIT-steps and refreshing the site, it gave the message “403 Forbidden nginx/ 1.16.1” I tried to fix it by replacing the index.md file, but it didn’t work.

It appeared I placed the index.md file in de wrong folder. After replacing it in the right folder and the 5 GIT steps, my site was up and running again.

Using Sublime and Mark Down

I find Sublime and Markdown relatively easy to use. Sublime is pretty straight forward and thanks to the .md templates from FabAcademy I can use some basic Mark Down codes. First by c/p but now some by typing

Thanks to a fellow student I leard the code: space space enter to skip a white line.

I will use the Mark Down Cheat Guide and the internet for more codes.