Skip to Content
SBA

Version Control

Overview

In this assessment, you will apply the skills you’ve learned throughout the Version Control module in a real-world Git project simulation. This project will challenge your ability to manage branches, handle merge conflicts, submit pull requests, and collaborate with others using GitHub.

You will set up a GitHub repository, work with branches, simulate team collaboration by resolving conflicts, and submit pull requests. The final deliverable will include the link to your GitHub repository and a reflection on the steps you followed to complete the project.


Time Allotment

  • Time: 2 hours

Instructions

Part 1: Set Up the Repository

  1. Create a New GitHub Repository:

    • Log in to your GitHub account and create a new repository.
    • Name the repository as follows: version-control-simulation-[yourname].
    • Do not initialize the repository with a README or any other files (this will be done locally).
    • Copy the repository URL for future use.
  2. Clone the Repository:

    • Clone the repository to your local machine:
    $ git clone https://github.com/your-username/version-control-simulation-[yourname].git

Part 2: Create and Manage Branches

  1. Create a New Branch for a Feature:

    • In your local repository, create a new branch called feature/header to simulate working on the header section of a webpage:
    $ git checkout -b feature/header
  2. Make Changes in the Feature Branch:

    • Create a simple index.html file, and add a basic HTML structure with a header.
    • Stage and commit the changes:
    $ git add index.html $ git commit -m "Added header section to index.html"
  3. Switch Back to Main:

    • Switch back to the main branch:
    $ git checkout main

Part 3: Simulate a Merge Conflict

  1. Create a New Branch for Another Feature:

    • Create another branch called feature/footer to simulate working on a different feature:
    $ git checkout -b feature/footer
  2. Make Changes in the New Branch:

    • In index.html, add a footer element at the bottom of the file.
    • Stage and commit the changes:
    $ git add index.html $ git commit -m "Added footer section to index.html"
  3. Switch Back to feature/header:

    • Now, switch back to the feature/header branch and modify the index.html file by changing something in the footer section to simulate a conflict.
  4. Merge feature/footer into main:

    • Merge the feature/footer branch into main:
    $ git checkout main $ git merge feature/footer
  5. Attempt to Merge feature/header:

    • Now, try merging the feature/header branch into main:
    $ git merge feature/header
  6. Resolve the Conflict:

    • A merge conflict will occur. Open the conflicting file, resolve the conflict, and commit the resolved changes.
    • Use git status to ensure all conflicts are resolved, then:
    $ git add index.html $ git commit

Part 4: Submit a Pull Request and Review Peers’ Work

  1. Push Changes to GitHub:

    • Push your changes to GitHub:
    $ git push origin main
  2. Create a Pull Request:

    • On GitHub, create a pull request from your main branch to a new branch called review/main.
    • Add a description of the changes you made in the pull request.
  3. Simulate Reviewing a Pull Request:

    • Find a peer’s repository (shared through Canvas).
    • Review their pull request, add comments, and approve or request changes.

Deliverables

You must submit the following through Canvas by the due date:

  1. GitHub Repository Link:

    • Submit the URL to your GitHub repository where your work is stored.
  2. Project Reflection:

    • In a document or Markdown file, write a reflection of approximately 300 words, addressing the following:
      • The steps you took to create and manage branches.
      • How you handled the merge conflict.
      • How the pull request process helped you ensure code quality and collaboration.
  3. Peer Review Evidence:

    • Provide a screenshot or link showing that you reviewed a peer’s pull request on GitHub. Include a brief description of your review (e.g., comments, approval, or requested changes).

Rubric for Evaluation

CriteriaExcellent
(18-20 points)
Good
(14-17 points)
Satisfactory
(10-13 points)
Needs Improvement
(1-9 points)
Points
Repository SetupRepository is correctly set up with appropriate naming conventions and a well-organized structure.Repository is set up correctly but may lack proper naming conventions or clear organization.Repository is set up but with issues in naming conventions or organization.Repository is incomplete, incorrectly set up, or poorly organized.__ / 20
Branching and MergingCorrectly creates and manages branches, resolves conflicts effectively, and uses clear, descriptive commit messages.Manages branches and resolves conflicts but with minor errors or inconsistent commit messages.Branches and resolves conflicts but with notable errors or unclear commit messages.Does not correctly manage branches, resolve conflicts, or provide meaningful commits.__ / 20
Pull RequestsPull requests are created correctly, with clear descriptions, peer review evidence, and detailed comments.Pull requests are created but may lack clear descriptions or peer review evidence.Pull requests are submitted but are incomplete, with minimal descriptions or limited review.Pull requests are poorly handled, missing, or lack required descriptions and review.__ / 20
ReflectionProvides in-depth insight into the workflow, clearly discussing challenges faced, solutions implemented, and key takeaways.Reflection addresses the workflow but may lack detail on specific challenges or solutions.Reflection is basic, with minimal clarity on the workflow and decision-making process.Reflection is missing, incomplete, or provides little understanding of the process.__ / 20
Overall Project QualityThe project is well-executed, meets all requirements, and demonstrates a strong understanding of Git and version control best practices.The project meets most requirements and shows a good understanding of Git and version control.The project meets basic requirements but has notable issues in the use of Git or version control.The project does not meet key requirements, with significant issues in version control practices.__ / 20
Total: ____ / 100 Points

Submission Guidelines

Please submit the following items via Canvas:

  1. GitHub Repository Link: Ensure your repository is publicly accessible or that the appropriate permissions are granted to the instructor for review.
  2. Project Reflection: Include a document or Markdown file with your reflection.
  3. Peer Review Evidence: Include a screenshot or link showing your review of a peer’s pull request.

Make sure your submission is complete and follows the guidelines by the due date.