Skip to main content

Lab-5-1

(5% of the course mark)

Git and GitHub Concepts

  • In this lab, students will learn the foundational concepts and commands of Git, a popular version control system. Students will use: https://learngitbranching.js.org to practice Git commands by completing step by step challenges. Students will also explore basic GitHub functionalities like repositories, branches, commits, and pull requests. This lab focuses on enabling students to understand the purpose of version control, collaborate with others, and keep a history of their projects.

Lab objectives

  • Understand version control basics.

  • Initialize a local Git repository, stage and commit changes, and manage commits.

  • Set up a remote repository on GitHub, connect it to a local repository, and push code.

  • Create and manage branches, switch between branches, and understand the basics of merging changes.

  • Utilize GitHub’s web interface to view commits, create branches, and open pull requests.

Git

  1. Navigate to https://learngitbranching.js.org.

  2. Start with the Main tab and work on the first 4 challenges.

git
  1. Once a challenge has been completed, it will change to look similar to the image below.
git-ok
  1. Take a screenshot of the completion of the first 4 challenges and name it: git.png.
Lab Tips

This lab requires you to only do the first 4 challenges. Feel free to explore the other challenges to expand your Git knowledge.

GitHub

  1. Navigate to: https://docs.github.com/en/get-started/start-your-journey/hello-world

  2. Follow the step by step guide of the lab.

Lab Tips

Please note to set the repository to Public when prompted.

  1. After finishing the lab, take note of the public repository url.

Submission

  1. Create a folder named submit.

  2. Copy all (git.png) the previously saved screenshots to this folder.

  3. Inside the submit folder, create a text file and name it: github-url.txt and enter the public repo url noted on step 3 of the GitHub lab and save the changes.

  4. Create a zip file of this folder.

  5. Navigate back to where the lab was originally downloaded, there should be a Submissions section (see below) where the zip file can be uploaded.

submission