Final Exam!

Please download the answer template file here and rename it to <your_andrewid>.txt. Submit the text file to the Final assignment on Autolab.

  1. List the git commands necessary to create the history graph shown below. You can omit git add and the actual editing of files, but should list any other commands you use (should be git commit, git branch, git checkout, and git merge). (Assume you start on the master branch. Hint: the first command should be git commit -m "A").
  2. Fork the repository at https://github.com/aperley/98-174-final-q2 and complete the following steps. Do not forget to answer the questions as well. Submit the url to your fork in your andrewid.txt file.
    1. Merge the my-bugfix branch into the master branch. What is this type of merge called?
    2. Merge the my-feature branch into the master branch. Why does this cause a merge conflict? Resolve the merge conflicts so file.txt looks like this:
      This is file.txt.
      This line was added in the master branch after my-feature was created.
      This line is added in the my-feature branch.
    3. Push the master branch to the master branch on your fork.
    4. Make a pull request from your fork's master branch to the blessed repository's master branch.
  3. Take a look at the Github repository for Rails: https://github.com/rails/rails. Who (name and email address) last modified line 72 of activemodel/lib/active_model/attribute.rb in the master branch and on what date?
  4. BONUS (optional): Download this repository. Someone added a secret password to myfile.txt and ran git add myfile.txt, but then ran git reset HEAD myfile.txt and git checkout myfile.txt. Find the secret password and write it in your andrewid.txt file. Hint: the git fsck command is very helpful.

Have a great summer! 🌞