[SOLVED] CSCI3901 Lab5-Version Control

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab_5-too6wj.zip (859.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

In this lab, you will explore the version control system called Git. you will apply your knowledge of version control, notably Git, to manage a set of files for a project.

You will be given an initial configuration of Git for a project and will be asked to effect a set of changes to the files, stored in Git, to achieve a target configuration for your Git repository.

Preparation

  • Download and install Git. You may use your IDE if it supports git integration, or through the command line (on windows, you may want to install Git Bash alongside Git for this).

Resources

There are many Git tutorials online that can help you. Some examples are

Procedure

Set-up

  1. Download and unzip the Git repository from Brightspace.

Lab steps

Part 1 – History Using git status, git log, git diff, and git branch answer the following questions:

  1. How many commits are there?
  2. What is the commit message associated with the most recent commit?
  3. Which commit added the basePrices static variable?
  4. How many branches are there?
  5. Which is the last commit on the coupons branch?

Resources: status, diff, log, branch

Part 2 – Basic operations

  1. Fix the 3 remaining bugs from the Debugging lab. In particular:
    • On lines 62, 64, and 66, topping == str should be equals(str)
    • On lines 63, 65, and 67, price = should be price +=
    • The final price should be price = price – price*coupon/100
  2. Commit these bug fixes with a suitable commit message

Resources: add, commit

Part 3 – Branching

  1. Create a new branch called burger. Your new branch should be off the repository’s master branch
  2. Add a new menu option for a burger. A burger at HfxDonairExpress costs $2.50
  3. Commit this change on the burger branch
  4. Finally, merge the burger branch into the main branch

Resources: branch, checkout, add, commit, merge

Questions

  1. When working alone on a project, how frequently should you commit your code to a version control system? Explain why.
  2. When working in a team, how frequently should you commit your code to a version control system? Explain why.
  3. Why might you create branches for your project in your version control system?
  • Lab_5-too6wj.zip