This second lab allowed me to become more acquainted with best practices on the web and tracking changes through the Git version control system. I normally use Git through a GUI built into Visual Studio Code, and using it through the command line was a new experience I found beneficial. Following this lab, I took the time to go through the Git How To website to better understand its fundamentals.
During this lab
~/public_html/cs133/lab2,
git init was used to initialise a
Git repository.
nano lab2.html.
chmod 705 lab2.html.
git add lab2.html was used to stage
the lab2.html file and
git status confirmed this.
git config --global user.name "Leo
Riviera"
and
git config --global user.email
"u2014020@dcs.warwick.ac.uk".
git commit -m "Added a new web page".
lab2.html.
git commit -m "Improved lab2.html standards
compliance".
nano lab2.css, a new file was
created to hold the CSS classes for custom
styling in lab2.html.
nano lab2.html was used to edit the
HTML file, to add div tags and a
reference to the stylesheet.
git add . and all, the changes were
committed using
git commit -m "Added styles".
git, which allows the use of Git
version control on a project.
git init, which creates a new git
repo in the current directory.
git config, which configures the
details that Git has, including name and email.
git add, which adds any untracked
files to source control.
git commit, which commits changes
made to version control. The
-m flag can be used to commit with
a message.