Git and GitLab Classwork: Work with a partner. One of you will be Bob and the other Alice. Before you start, ensure you have: - Git installed on your local machine - A GitLab account - A command-line shell: Bash on Windows or Terminal on MacOS - Proper git configuration (See: Class Webpage > "Git" > "Configuring git") (1) Bob (on GitLab): (1.1) Login to GitLab and create a *public* repo with a distinct name. (2) Bob (on your local machine, i.e., your laptop): (2.1) *Clone* the repo. "git clone " (2.2) Move into the cloned directory using "cd". (2.3) Add a new file. "bobfile.txt" with some text. (2.4) Run: "git status". Question 1: What does the above command output (briefly describe)? (2.5) Run: "git add bobfile.txt" (2.6) Run: "git commit -m 'first commit'" (2.7) Run: "git status" again. Question 2: Do you notice any differences compared to the first "git status"? (2.8) Push changes to remote. "git push origin main". Question 3: What is "remote"? what is "origin"? What is "main"? (3) Bob (on GitLab): (3.1) Add Alice as a collaborator (Developer access). You will need Alice's GitLab username. Navigate in GitLab: YOUR_CREATED_PROJECT > Manage (left menu) > Members (4) Alice (on GitLab): (4.1) "Fork" Bob's repo into your namespace: - Login to GitLab - Click "Explore projects" > "All" - Search for Bob's repo - Click "Fork" and select your namespace. Question 4: What is the difference between "clone" and "fork"? (5) Alice (On your local machine): (5.1) "Clone" your forked repo. (5.2) Create a dev branch and switch to it: "git checkout -b dev" (5.3) Create a file, alicefile.txt, in the repo and add some text to it. (5.4) Add and commit "alicefile.txt" (similar to steps (2.5), (2.6)), then push to "dev": "git push origin dev" (5.5) Merge "dev" into "main" **on your local machine**: - Switch to main: "git checkout main" - Merge dev: "git merge dev" (5.6) Push to main: "git push origin main" (This will update the remote repository with your local changes.) Question 5: Can you see the file "alicefile.txt" on Bob's namespace? (6) Alice (on GitLab): (6.1) Select your forked repo (6.2) Click "Merge requests" in the left menu (either directly or via "Pinned" or "Code" menu) (6.3) Click "Create merge request" (6.4) Select "source branch" as "main" (6.5) Click "Submit merge request" (6.6) Ask Bob to check their account and accept the merge request (left menu > Code > Merge requests). Question 6: Can you see the file "alicefile.txt" on Bob's namespace now? (7) Switch roles (Alice becomes Bob) and repeat the classwork.