There are two rebasing exercises to complete.
Explanation and overview of rebasing
https://www.benmarshall.me/git-rebase/
Comparison of rebasing and merging
https://slides.com/paul_melero/git-rebase#/21/0/0
Don't be afraid to ask your line manager or a colleague for help completing these exercises
You should end up with a single consolidated readme file - this will generate conflicts that need will resolving!
In each of the branches you will find an edited readme with instructions for the rebase task. Complete each task using rebase
, then merge
these updated changes back to the trunk. Once complete submit a pull request to this repository and assign to your line manager for review!
Fork this repository to your personal GitHub account, this will copy all branches for you to work on locally, then complete the two tasks using the rebase
command (see readme on each branch for details). When complete you should merge
the TASK-X branches to the trunk branch.
At the outset the branch tree looks like this:
Once complete the tree should be a single linear commit history resembling that below
The commit history should resemble the following
This branch contains a number of commits that are very noisy, while useful during development, no value is offered by presering all these when merging back to the trunk branch therefore all of these commits should be combined into a single commit before submitting a PR
Mistakes happen, part of the code review should be to identity and potential errors or accidental disclosures that might happen during software development. This branch contains a commit that needs to be removed using the drop
option, the remaining commits should be preserved using the pick
option.
Fork the repository below and follow the instructions. This time, once complete, share the forked repository with your line manager for review!