Skip to content

Task 1: Git Tutorial

Git..... in the lens of a dummy

For Fab Academy, it is recommended for us to utilise Git as a way to control and manage changes to your documentation site in the Fab’s cloud repository. Here’s the thing. I am a dummy to Git. I know of it..... but nothing about it. So let’s get some terms out in the way if you’re also a dummy and new to all of this (just like me):

  • git: an open-source and distributed version control system that is widely-used for tracking changes in computer files
  • version control: tracking and managing changes to to computer programs, documents, large web sites, or other collections of information.
  • repository: a central location in which data is stored and managed.

Before I really start - I went and watch this video series called Git and GitHub for Poets recommended by Rico which I think is friendly enough for noobs like me. Here are some of the important functions that we will be using throughout the course:

  • $ git pull: fetch and download content from a remote repository to the local repository and match the content.
  • $ git add: add changes to the staging area.
  • $ git status: displays the state of the working directory and the change in the staging area.
  • $ git commit -m "insert message": captures the project’s staged changes. You have to include a message/description before commiting the changes
  • $ git push: upload the staged changes into the repository.

Here is an image to visualise a simple Git workflow Alt text

Setting up Git

Check your OS. Windows does not come with Git function so you ought to install it prior to getting everything going. Download Git. Access the terminals GitBash (it comes with the Git download!) or Powershell to utilise the many git commands.

  1. First things first - Let’s configure your git settings with the following commands (just start typing directly on the terminal):

    • $ git config --global user.name "Your Name"
    • $ git config --global user.email "your@email.com" alt text
  2. You then need to generate an SSH key from your terminal to the Fab Cloud Respository with the following code ssh-keygen -t rsa -C "your@email.com"

  3. Copy the SSH key from the terminal and paste it into the Fab Cloud Repository’s User Settings

Alt text

  1. Once you add your new key we can start working on your site with Git. I would recommend using VSCode as your scripting and coding software. Not only you can code with your preferred coding language but it also has a built-in terminal and extensions that helps visualise the Git functions for noobs in a UI & UX-friendly form.