Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Reg.No.

4718 Student Name Hamza Rehman

Due Date 07 – 03 – 2023 Submitted Date 07 – 03 – 2023

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

Task 2) Set the global settings for user.name and user.email with appropriate
commands. Later onlist the global settings to verify that name and email are properly stored.
Task 3) Initialize the local repo using appropriate command, and create two text files,
i.e.tools.txt and roles.txt.
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.
Task 5) Now track these files for version management using appropriate git command and
commit the changes with proper message.
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.
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.

Task 8) Push the committo the remote repo and verify that GitLab repo is updated with all
changes.
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.

Task 10) Commit these new files and push at the remote repo.
Task 11) Some senior DevOps engineer has seen your remote repo and he has suggested to
remove twotext 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.
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.
Task 13) Commit changes and push to remote repo. Use git log command to list all the
commits and provide the detail 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.
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.
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.

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.
Task 18) Now merge the two branches, i.e.roles and tools, to the main branch using
appropriate git command.

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

You might also like