Homework 3 Solution

$35.00 $30.80

Description

  1. Download and install Git (https://git-scm.com/downloads). At the time of writing the current version is 2.20.1. The instructions will be different for Mac and Linux users, so use your best judgment during the installation.

 

  1. Start the installation process. When you are on the “Adjusting your PATH environment” screen, make sure that you select the option that says “Use Git and optional Unix tools from the Windows Command Prompt”. You should be able to keep all of the other defaults.

 

  1. Verify that git has been installed correctly by running the following command from within the Git Bash application to verify that the current version is 2.20.1:

 

git –version

 

  1. If you don’t already have one, setup a Github (https://github.com/) account. The accounts are free and you’ll be using them for your assignments. Personal opinion: you should be usingthem for all of your school-related work anyway.

 

  1. Log in to Github. Follow the link below and accept the assignment: https://classroom.github.com/a/yoijN90m

Accepting the link will create a new repository in the classroom called:

 

hw3-<your account username>

 

You may not see this repository in your normal Github account, but you will be able to access it at the URL:

 

https://github.com/depaulcdm/hw3-<youraccountusername>

 

  1. [25 points] Using the repository from the previous step, please perform the following tasks:

 

  • [1 point] On your local machine, create a new directory called hw3<your-initials>(e.g. hw3cj). Change into the directory and initialize it as a Git repository. Provide a readable screenshot of the contents of the new directory.

 

  • [2 points] Create a new file called mdand add some markdown text to it. Add that file to your staging area, and commit your changes to your local repository. Make several other commits to the README.md. Capture the output of the git log.
  • [2 points] Push your local repository to Github: git remote add origin ←-

https://github.com/depaulcdm/hw3-<your git account name>.git git push –set-upstream origin master

 

SE-441 Homework 3

 

 

  • [1 point] List the contents of the .git/refs/headsdirectory and capture a readable screenshot.

 

  • [2 points] Create two branches off of the master List the contents of the .git/refs/headsdirectory and capture a readable screenshot.

 

  • [2 points] Change to the first branch and update and commit a change to the mdfile. Merge that change to master. Review the history using git log and capture a readable screenshot of the output.

 

  • [2 points] Change to the second branch and update the same line in the mdas you did in step g. Commit your change and attempt to merge to master. Resolve any merge conflicts and complete the merge. Push your master branch to Github.

 

  • [2 points] From the Github ‘Code’ page, Then click the button containing the partial SHA1 hash to the right of the commit message. Capture a readable screenshot of the difference between that version of the mdfile and the prior version. Use a git diff command to produce the same thing from the command line and capture a read-able screenshot of the output. Review the history using git log and capture a readable screenshot of the output.

 

  • [1 point] Create a new file, <my initials>.md(e.g. md) and add some content. Cap-ture the output of git status.

 

  • [1 point] Add the new file to your local repository, but do not commit it. Capture the output of git status.

 

  • [2 points] Perform a git reset –mixed. What was the result?

 

  • [1 point] Make another change to the file, but do not add it to the index or commit it to your repository. Capture the output of git status.

 

  • [3 points] Execute a git resetand capture the output of git status. What was the affect of the reset on your index? What was the effect of the reset on the local file?

 

  • [3 points] Execute a hard reset: git reset –hard. What was the affect of the reset on the index? What was the effect of the reset on the local file?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 2 of 2