Assignment 6 - Branching Practice

Version Control Essentials

Assignment 6 - Branching Practice

For this assignment, you will practice Git branching, cautious merging, and making simple HTML/CSS updates.

Show/Hide Video

Instructions

  1. Clone this repository:
git clone https://github.com/fvtc/vce-branching-practice.git

Note

You can fork this repository if you want, but it's not necessary for this assignment.

  1. Create a dev branch

  2. Create and complete the following feature branches:

  • feature/link-color

  • feature/purpose-style-update

  • feature/new-section

The instructions for each feature branch can be found below.

  1. Merge all of your branches into dev and then into main

Important

Remember to use the Cautious Merge strategy when merging your branches.

Feature Branches

branch: feature/link-color

Open the css/styles.css file and update the .link code to match the following:

.link {
    color: #006600;
    text-decoration: underline;
    font-weight: bold;
}

This will change the link color to a dark green.

Feature: Purpose Style Update

branch: feature/purpose-style-update

Open the css/styles.css file if it's not already open, and update the .purpose code to match the following:

.purpose {
    font-style: italic;
    color: #555;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

This will change the style of the purpose section to be italicized, a lighter gray color, and slightly larger font size.

Feature: New Section

branch: feature/new-section

Open the index.html file and add a new section with the following content:

Place this section after the closing </ul> tag and before the closing </body> tag:

<section>
    <h2>Latest News</h2>
    <p class="news">We just learned how to use Git branches!</p>
</section>

Open the css/styles.css file and add the following CSS to style the new section:

.news {
    color: #005577;
    font-size: 1rem;
}

Submission

Once you have completed all the tasks, run the following command:

  1. Paste the output of the following command in Blackboard:
git log --oneline
  1. Answer the following:
  • Why is it helpful to use separate branches for each feature?

  • What does merging dev into a feature branch help prevent?

  • Did you encounter any merge conflicts? How did you resolve them?