Skip to content

pavelmikulik-inspeerity/exemplar-php-rebasing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rebase 101

There are two rebasing exercises to complete.

Useful Reading

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

Now complete the exercises below

Don't be afraid to ask your line manager or a colleague for help completing these exercises

EXERCISE 1

Goals

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!

Instructions

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:

image

Once complete the tree should be a single linear commit history resembling that below

image

The commit history should resemble the following

image

Add branch readme instruction segments (from merge conflicts) here:

squashing commits

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

dropping commits

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.

EXERCISE 2

Fork the repository below and follow the instructions. This time, once complete, share the forked repository with your line manager for review!

https://github.com/lineten/exemplar-workshop-git-rebase

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%