There are two branches, master
branch and add
branch, on this repository.
The master
branch contains a skeleton code for a calculator (the same one as the assignment),
and the add
branch contains the skeleton code and the implementation of add function.
You will make two pull requests, one for the master
branch and one for the add
branch.
- Fork this repository and clone the fork into your local machine.
- Make a new branch
calc1
from themaster
branch and checkout to it. - Implement add, sub, and mul function, while making one commit for each function. This means, you should make three commits in total.
- Push your branch into origin repository and make a pull request to the
master
branch of the upstream repository(this repository) from yourcalc1
branch.
- Checkout to a new branch
calc2
from thecalc1
branch. - Squash the three commits you have made and push it into the
calc2
branch of your fork. - Since add function is already implemented in the
add
branch, there will be a conflict between theadd
branch andcalc2
branch. - Resolve the conflict and make a pull request to the
add
branch of the upstream repository from yourcalc2
branch.
- Note that the two pull requests should not contain any conflicts after you finish all the steps.