Welcome to the Bootcamp Cookbook! This repository serves as a workspace for us to learn Git flows, collaboration, and version control while building a collection of delicious recipes.
Before we start, ensure you have the following:
- Git installed (Download here).
- A Code Editor (we recommend VS Code).
- A GitHub Account.
- Install the GitHub Pull Requests extension.
If you haven't already, get this cookbook repo onto your local machine:
- Clone the Repository:
git clone https://github.com/portsoc/bc-cookbook.git
- Enter the folder:
cd bc-cookbook - Open the project in your code editor.
We will be working in 15-minute sprints. Follow these steps for every single ticket you work on.
Before starting anything, make sure your local computer has the latest version of the book.
git checkout main
git pull origin main- Go to the Issues tab in this repository.
- Find an open task (e.g., "Add Pancake Recipe", "Ensure no recipes contain lead",
<strong\>instead of<b\>). - Assign yourself to the issue so others know you are working on it.
Never work directly on the main branch. Create a workspace for your specific task.
# Naming convention: feature/name-of-task
git checkout -b feature/add-pancakesDo the work required for the ticket (create the HTML file, fix the typo, remove poisonous heavy metals from ingredients). Once you are happy with your work:
git add .
git commit -m "Added basic HTML structure for pancakes"(You can do this multiple times during the sprint!)
Write some tests for the code in plain english. Consider edge-cases for these tests (e.g. a person should not be able to add an empty recipe; a person should not be able to add a recipe over 100000 characters....etc.) Verify that the code passes the tests by running the code.
When your ticket is done:
- Push your branch to the cloud:
git push origin feature/add-pancakes
- Go to the GitHub page for this repo.
- You will see a yellow banner: "Compare & pull request". Click it.
- Write a brief description and click Create Pull Request.
- Stop Coding: When the sprint timer ends, stop.
- Peer Review: Ask another group to review your Pull Request on GitHub. They should check it is appropriate and look for things like correct HTML and typos in content.
- Merge: Once approved, click "Squash and Merge" on GitHub.
- Stand-Up: We will have a quick group sync to discuss blockers and show off new features.
1. Never commit to
main. Always use a branch.2. Always
git pullbefore starting a new branch.3. Don't merge your own Pull Request. Get a second pair of eyes on it.