1. Project management

During this week, we were obligated to build a website in order to document all of our work and the steps necessary to reach every goal set to us.

The task we had to do was to describe ourselves in the about section and to have a general idea of our final project, which we had to talk about briefly.

A Brief History of Gitlab

  • Originally created in Ruby by Ukranian developers Dmitriy Zaporozhets and Valery Sizov, GitLab is a multifaced tool utilized for lifecycle management which provides a Git-repository manager.

  • This useful tool revolves around issue-tracking and continuation integration, offering deployment pipeline features.

GIT

Git is considered to be one of the most powerful open source version control systems constructed to manage a wide variety of projects - the very small to the very large. What characterizes Git is the fact it is rather simple to learn and works with efficiency and speed.

Having used Git in depth for the first time, I found great joy in figuring out how it works and the necessary commands for it to achieve my goal.

This comprised of installing Git, retrieving the SSH key, cloning my repository to gain local access, and learning how to control the repository updates.

Downloading Git:

To access Git for Mac, we ought to search for the original site at https://git-scm.com/. Then we go to downloads and pick the suitable option:

Taking Baby Steps..

The first step in order to archive your current work and future content is to make a local copy - a sort of clone - of the remote repository. To implement this step, you have to be included to the repository as a developer.

FabLab has made this step easy for us as they have provided us with a brief introduction that explains most of this stuff.That said, we had to take the initiative to getting around using the terminal to achieve what we have in mind with regard to git.

Now, you need to log in to the GitLab interface using your specific credentials sent via e-mail.

Authentication & Encryption

Authentication is necessary in order to push information/content to the repository, so an SSH key has to be generated and saved in the GitLab interface.

During this week, we had enough time to learn how to setup a SSH key for our system such that we can easily copy the resulting string to the GitLab configuration to allow SSH cloning without needing to add our userame and password.

Generating the public/private rsa key pair, we get

At first, I faced some issues finding the SSH keys section in GitLab. However, I resolved this by going over the detailed tutorial from gitlab once more.

Consequently, I went to my user profile > Profile Settings > SSH Keys, copying the generated key and adding it by clicking on the Add SSH Key button.

Serving MkDocs Locally

Throughout this course, we will have to get accustomed to using a personal website such that we document all that we need each and every week.

The current Markdown to site generator, MkDocs, requires a couple of simple steps to download. Just to note, MkDocs is considered the default choice for our Fab Academy sites since it’s way more efficient for developing purposes to locally serve the repository before pushing to production or MASTER branch in the actual online Gitlab repository.

To manually install MkDocs, Python ought to be installed on the system, including the Python package manager, pip.

Checking to see if they are both already installed in the system, we use this command line:

$ python --version
Python 3.8.2
$ pip --version
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

If python and pip are not installed, we need to install them as soon as possible to have MkDocs working for us!

Installing python, we need an appropriate installer for our system from python.org and running it.

Installing pip:

python get-pip.py

Finally, installing MkDocs using pip:

pip install mkdocs

Now, we should have the mkdocs command installed on our system.

Finally Run mkdocs --version to check that everything worked fine.

$ mkdocs --version
mkdocs, version 0.15.3

Commands to manage the Gitlab repository:

  • Discarding local changes
 git stash 
  • Downloading the latest content from a remote instance of the repository by default “Gitlab fabacademy”
git pull
  • Adding changes in repository to buffer
git add .
  • Adding changes in buffer and commit with a descriptive message
git commit -m "week01, added images, archives, etc."
  • Pushing current commits to remote repository “Gitlab Fabacademy by default”
git push
  • Deleting file from git history
git filter-branch -f --prune-empty --index-filter "git rm -r --cached --ignore-unmatch ./file1" HEAD