You are on page 1of 3

CS 494 – Special Topics in CS (DevOps)

Assignment 02
Version Control System (Git, GitLab)

Reg. No. Student Name

Due Date 07 – 03 – 2023 Submitted Date

Git and GitLab (CLO-2)

Version control system (VCS) is an essential tool used by developers and DevOps engineers to
collaborate and deliver software efficiently to end-users. In this assignment, we will be using Git
and GitLab to demonstrate the usage of these tools.

This assignment is practical and requires you to work on a Linux machine. Before starting, ensure
that Git is installed on your machine, and you have set up a GitLab account. The following tasks
need to be performed in the provided sequence, and you must provide a screenshot of the output
after completing each task.

Please note that this is a professional assignment, and you should approach it with the required level
of seriousness and professionalism. If you have any questions or require assistance, do not hesitate
to ask the instructor for clarification.

Task 1) Open the terminal and create a directory cs494-assignemnt-1 using command
and navigate inside the directory.

<Paste your screenshot here>

Task 2) Set the global settings for user.name and user.email with appropriate
commands. Later on list the global settings to verify that name and email are properly stored.

<Paste your screenshot here>

Task 3) Initialize the local repo using appropriate command, and create two text files, i.e.
tools.txt and roles.txt.

<Paste your screenshot here>

Task 4) Open the tools.txt file with nano editor and save names of tools, e.g., GitLab,
GitHub, Jenkins, Docker, Kubernetes, etc. Now open second file roles.txt with nano and
populate the file with roles like DevOps Engineer, Cloud Engineer, Release Engineer, etc.

<Paste your screenshot here>

Page 1 of 3
CS 494 – Special Topics in CS (DevOps)

Task 5) Now track these files for version management using appropriate git command and
commit the changes with proper message.

<Paste your screenshot here>

Task 6) Go to your GitLab account and create a remote repo with the name of CS494-
DevOps-Assignment-1, make sure it should be a public repo, without any README.md file.

<Paste your screenshot here>

Task 7) It is time to connect local repo with the remote one. With the help of git command
add a remote origin to your local repo, also list all the remotes added.

<Paste your screenshot here>

Task 8) Push the commit to the remote repo and verify that GitLab repo is updated with all
changes.

<Paste your screenshot here>

Task 9) Now we’ll populate the repo with some dummy data files. Create at least five text
files with some random data. You can decide the names of the files based on your choice.

<Paste your screenshot here>

Task 10) Commit these new files and push at the remote repo.

<Paste your screenshot here>

Task 11) Some senior DevOps engineer has seen your remote repo and he has suggested to
remove two text files directly from the GitLab Repo and commit the changes. Once done, go to
local repo and pull the changes to make it up to date.

<Paste your screenshot here>

Task 12) After some thought process you have realized that text files with random data are not
suitable for remote repo. But you don’t want to delete these files from your local repo. Your
engineering mindset come with a solution of .gitignore file. Create a .gitignore file in
local repo and write some rules in the file, e.g. ignore all the text files in root folder, do not
ignore tool.txt and roles.txt files.

<Paste your screenshot here>

Task 13) Commit changes and push to remote repo. Use git log command to list all the
commits and provide the detail here.

Page 2 of 3
CS 494 – Special Topics in CS (DevOps)

<Paste your screenshot here>

Task 14) Now we are going to mange multiple branches in this repo. Create a new branch with
name of roles using git branch command. List all the branches present in this repo.

<Paste your screenshot here>

Task 15) Switch to the newly created branch and add an HTML file with name of devops-
roles.html. This file will contain headings (i.e. h1) for different roles and some paragraphs to
describe those roles. You can take this description from any website, if you want. Commit the
changes with appropriate message and push to the roles branch.

<Paste your screenshot here>

Task 16) Switch back to the main branch, and create another branch with the name tools,
using git checkout command. List all the branches present in this repo.

<Paste your screenshot here>

Task 17) Add an HTML file, having name devops-tools.html. This file will contain the
headings for different tools along with their short description as paragraphs. Commit the
changes and push the contents to the tools branch.

<Paste your screenshot here>

Task 18) Now merge the two branches, i.e. roles and tools, to the main branch using
appropriate git command.

<Paste your screenshot here>

Task 19) Provide the screenshot of all files/contents present in the main branch.

<Paste your screenshot here>

Deadline
 Tuesday, March 07, 2023… at 11:30 AM (before class)

Instructions
 You have to submit the assignment as per mentioned deadline.
 Soft copy is required for the assignment.
 Upload the assignment as a PDF or DOC file at LMS.
 This page must be the front-page of your assignment.

Page 3 of 3

You might also like