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
-
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.
-
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
-
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
- In your local repository, create a new branch called
-
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"
- Create a simple
-
Switch Back to Main:
- Switch back to the
main
branch:
$ git checkout main
- Switch back to the
Part 3: Simulate a Merge Conflict
-
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
- Create another branch called
-
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"
- In
-
Switch Back to
feature/header
:- Now, switch back to the
feature/header
branch and modify theindex.html
file by changing something in the footer section to simulate a conflict.
- Now, switch back to the
-
Merge
feature/footer
intomain
:- Merge the
feature/footer
branch intomain
:
$ git checkout main $ git merge feature/footer
- Merge the
-
Attempt to Merge
feature/header
:- Now, try merging the
feature/header
branch intomain
:
$ git merge feature/header
- Now, try merging the
-
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
-
Push Changes to GitHub:
- Push your changes to GitHub:
$ git push origin main
-
Create a Pull Request:
- On GitHub, create a pull request from your
main
branch to a new branch calledreview/main
. - Add a description of the changes you made in the pull request.
- On GitHub, create a pull request from your
-
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:
-
GitHub Repository Link:
- Submit the URL to your GitHub repository where your work is stored.
-
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.
- In a document or Markdown file, write a reflection of approximately 300 words, addressing the following:
-
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
Criteria | Excellent (18-20 points) | Good (14-17 points) | Satisfactory (10-13 points) | Needs Improvement (1-9 points) | Points |
---|---|---|---|---|---|
Repository Setup | Repository 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 Merging | Correctly 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 Requests | Pull 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 |
Reflection | Provides 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 Quality | The 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 |
Submission Guidelines
Please submit the following items via Canvas:
- GitHub Repository Link: Ensure your repository is publicly accessible or that the appropriate permissions are granted to the instructor for review.
- Project Reflection: Include a document or Markdown file with your reflection.
- 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.