You’re given a basic calculator project with two feature branches.
The goal is to rebase both features onto main with a clean, linear history.
main: Basic calculator with additionfeature-subtraction: Adds subtractionfeature-multiplication: Adds multiplication
- Run
git logonmainand it should look like:
<commit-hash-3> feat: add multiplication
<commit-hash-2> feat: add subtraction
<commit-hash-1> feat: initial calculator with addition
No merge commits. No branching.
- Fork this repo to your GitHub account
- Clone your fork
git clone https://github.com/<your-username>/<repo-name>.git cd <repo-name>
⚠️ Important: Create Pull Requests to your forked repository only. Do not create PRs to the original repository.
- Create a pull request from
feature-subtractiontomain
→ Use Rebase and Merge - Create a pull request from
feature-multiplicationtomain
→ You'll hit conflicts, resolve them → Use Rebase and Merge
Send a link to your forked repo when you're done.