This project focused on improving the current Greenwood Community Library website by incorporating a "Book Reviews" section and updating the "Events" page to captured forthcoming events. The project emulated a collaborative effort between two developers, Morgan and Jamie, who each played distinct roles in various components of the project.
- Project Overview
- Objectives
- Setup Instructions
- Branch Workflow
- Testing and Validation
- Contributor Guidelines
- Final Outcome
The Greenwood Community Library website originally featured fundamental sections such as Home, About Us, Events, and Contact Us. The objective of this project was to:
- Add a "Book Reviews" section to the website.
- Update the "Events" page with new community events.
The project replicated the cooperative efforts of two contributors utilizing Git and GitHub to efficiently manage modifications and integrate them.
- Practice cloning a repository and working with branches in Git.
- Gain experience in staging, committing, and pushing changes from multiple developers.
- Create pull requests and merge them after resolving any potential conflicts.
-
Create a Repository on GitHub:
-
Repository Name:
greenwood-library-website
-
Clone the repository to your local machine using:
git clone https://github.com/kanmyng/greenwood-library-website.git
-
-
Initial Setup:
-
On the
main
branch, create the following files using a code editor such as Visual Studio Code:home.html
about_us.html
events.html
contact_us.html
To open the project in Visual Studio editor, type
code .
in the Git Bash. This will automatically open the project in VS Code editor. -
Add some placeholder content to each of these files.
-
Stage, commit, and push these changes to the
main
branch:git add . git commit -m "Initial setup with basic web pages" git push origin main
-
Staging and committing files, and pushing to main the main branch
-
-
Create a Branch for Morgan:
-
Add Book Reviews Section:
-
Create Pull Request:
-
Merge Morgan's Work:
-
Create a Branch for Jamie:
-
Update Events Page:
-
Pull Latest Changes:
-
Before raising a PR, pull the latest changes from the
main
branch:
git checkout main git pull origin main git checkout update-events git merge main
-
- Resolve Conflicts: Manually resolve any conflicts with the main branch and conduct tests to confirm that all functionalities operate correctly.
- Create PR: Submit a pull request (PR) to integrate your modifications into the main branch, accompanied by a concise summary of the changes and their intended objectives.
- Review: Team members review the pull request (PR), and give their feedback or approval.
- Merge: Once approved, merge the PR into the main branch using an appropriate strategy (merge commit, squash, or rebase). After merging, verify that everything works correctly and delete the feature branch if needed.
To guarantee the reliability of the workflow, adhere to the following testing and validation procedures:
-
Manual Testing:
- Access each
.html
file using a web browser and confirm that the content is displayed correctly. - Examine the navigation across various pages to ensure that all links function properly.
- Check that the "Book Reviews" and "Events" sections feature the most current content.
- Access each
-
Code Review:
- Ensure that all modifications to the code are evaluated by at least one additional contributor prior to merging.
- Utilize GitHub's integrated code review features to provide feedback and recommendations..
If you wish to contribute to this project, please follow these guidelines:
-
Fork the Repository:
- Initiate your own fork of the repository on GitHub.
-
Create a Feature Branch:
- Always establish a new branch for your feature or bug fix.
-
Write Descriptive Commit Messages:
- Employ comprehensive commit messages that clarify the changes made and the rationale behind them.
-
Submit a Pull Request:
- After finalizing your changes, submit a pull request and request a review from another contributor.
-
Review and Testing:
- Assess the existing code for potential enhancements.
- Conduct thorough testing of your changes before submission.
-
Identify .html Files: Utilize File Explorer or Finder, or access your code editor to locate your .html files.
-
Access in Browser: Right-click on the file and select "Open with" followed by your preferred web browser, or alternatively, drag and drop the file into an active browser window.
-
Visit Greenwood Library Website: Type the website URL into the address bar of your browser to access the Greenwood Library page and examine its offerings.
Following the integration of contributions from both Morgan and Jamie, the Greenwood Community Library website has been enhanced to feature a new "Book Reviews" section, along with an updated "Events" page that showcases the most recent community happenings.