Background Scenario
You're part of a development team tasked with enhancing the website for the "Greenwood Community Library." The website aims to be more engaging and informative for its visitors. It currently includes basic sections: Home, About Us, Events, and Contact Us. Your team decides to add a "Book Reviews" section and update the "Events" page to feature upcoming community events.
You will simulate the roles of two contributors: "Morgan" and "Jamie". Morgan will focus on adding the "Book Reviews" section, while Jamie will update the "Events" page with new community events.
Objectives
- Practice cloning a repository and working with branches in Git.
- Gain experience in staging, committing and pushing changes from both developers
- Create pull requests and merge them after resolving any potential conflicts.
Setup
- Create a Repository on GitHub:
- Name it greenwood-library-website.
- Initialize it with a README.md file and clone it to your local machine.
Tasks
- In the main branch, using Visual Studio Code editor ensure there are files for each of the web pages.
- home.html
- about_us.html
- events.html
- contact_us.html
- Add any random content into each of the files.
- Stage, commit and push the changes directly to the main branch. (The is a simulation of the team's existing code base for the website)
Morgan's Work: Adding Book Reviews
- Create a Branch for Morgan:
- Switch to a new branch named add-book-reviews.
- Add a new file book_reviews.html to represent the Book Reviews Section:
- Add a random text content into the file.
- Stage, commit, and Push Changes with a message like "Add book reviews section."
- Push the add-book-reviews branch to GitHub.
- Raise a PR for Morgan's work
- Merge Morgan's work to the man branch
Jamie's Work: Updating Events Page Repeat the same flow for Jamie's work on Events Page. Ensure Jamie's work is in update-events branch.
- Pull the latest changes from the main branch into the update-events before raising the PR.