Please answer each question in the space provided. If the space is not enough, then use the back of the sheet. You must submit your lab exercises at the end of the lab with your name and student number.
Before starting you must have an account on GitLab. You should already have received an invitation to join a project called https://gitlab.com/COMP2718/lab1_USERNAME.git. Please check your MUN e-mail and accept this invitation and proceed to create your free GitLab account.
In a terminal window, enter the following:
% cd /tmp % git clone https://gitlab.com/COMP2718/2718_lab1.git % cd 2718_lab1
Using some or all of the following commands cd, ls, and pwd, determine the following, also state the commands used:
In a terminal window, enter the following:
% cd /tmp && rm -rf myweb # delete only if cd worked % mkdir myweb % cd myweb % echo "<html><body>HI</body></html>" > hi.html % git init # creates a git repo % git status % git add hi.html % git commit -m "lab 1 start" % git log % git remote add origin https://gitlab.com/COMP2718/lab1_USERNAME.git % git push --all origin -u # requires your password
NOTE: You must replace "USERNAME" above with your Memorial University username.
A git repo with one file has been set up and copied to the remote repo. The following commands will change a file and push the change to the remote repo.
% sed s/HI/hi/ <hi.html > xx.html % mv xx.html hi.html % git add hi.html % git commit -m "to lowercase" % git push # requires your password % git log
Use a web browser (e.g. Firefox) to view the remote repository at https://gitlab.com/COMP2718/lab1_USERNAME.git.
You should also verify that the remote repository has been updated appropriately through the command line:
% cd /tmp % git clone https://gitlab.com/COMP2718/lab1_USERNAME.git % cd lab1_USERNAME
How can the ls -lR command be used to provide a check (the check will be incomplete) that the directories /tmp/myweb and /tmp/lab1_USERNAME contain the same informaton.
Consider the following two directories which we will refer to as [1] and [2], respectively:
Change in to the /usr/share/dict directory, and answer the following, state what command(s) you used.