Just like homework, you will be submitting your answers as a zip folder on Autolab. Your zip folder should have the following structure:
andrewid.zip/ andrewid/ midterm.txt midterm_q4
Please write your answers to each question in this section in midterm.txt.
Is git distributed or centralized? Justify your answer by briefly explaining the difference.
Give an example of a bad commit message. Do not copy the one in the notes.
Give an example of a good commit message. Do not copy the one in the notes.
Download the question 2 repository here. You will see that the repository contains a single commit that added three files, and that the working directory and staging area are clean (no changes to stage or commit). WITHOUT making a commit, use git commands (of course, you'll have to edit some of the files too) to change the git repository so that the output of git status looks like below. For your answer to this question, list all the commands you used in order.
Aaron finished question 2 of this midterm, made a commit, then modified and
staged fileB. The output of git status
now looks like this:
Give a git command for each of the following cases that will achieve Aaron's goal:
You will answer the questions in this question by submitting the midterm_q4 git repository.
my_story.txt
and the output of git log to familiarize yourself with the story.
Don't forget to use the commands we've learned (git log, git show).
You should be on the chapter-2-acorn-theft
branch and there should be unstaged changes that add a chapter 2 to the story.
Add and commit these changes and merge the chapter-2-acorn-theft
branch into the master
branch.
You should be on the master
branch with chapter 2 committed after you complete this step.
chapter-2-love-story
branch and take a look at my_story.txt
.
On this branch, chapter 2 went in a different direction than on our original branch.
Merge this branch into master
to create a story that includes an acorn theft and a love story in Chapter 2.
Make sure it has a happy ending! Feel free to be creative when resolving the merge conflicts.
Don't forget to fully resolve all conflicts and finish the merge!