You are keeping notes on the cast of a sitcom you've started watching. Initially, you kept main cast and supporting cast on two separate branches.

gitGraph BT:
  commit id: "Add Joey"
  commit id: "Add Phoebe"
  branch supporting
  checkout supporting
  commit id: "Add Mike"
  commit id: "Add Janice"
  checkout main
  commit id: "Add Ross"

Now you wish to keep everything in the main branch.

Squash-merge the supporting-cast branch onto the main branch. You may use any suitable commit message. The result should be as follows:

gitGraph BT:
  commit id: "Add Joey"
  commit id: "Add Phoebe"
  commit id: "Add Ross"
  commit id: "Add Mike and Janice"

Exercise merge-squash

This exercise is currently under development/testing, not yet released to users.

To download the exercise:

  • Navigate inside the gitmastery-exercises folder.
  • Run gitmastery download merge-squash command.

Scenario:

You are keeping notes on the cast of a sitcom you've started watching. Initially, you kept main cast and supporting cast on two separate branches.

gitGraph BT:
  commit id: "Add Joey"
  commit id: "Add Phoebe"
  branch supporting
  checkout supporting
  commit id: "Add Mike"
  commit id: "Add Janice"
  checkout main
  commit id: "Add Ross"

Now you wish to keep everything in the main branch.

Your task:

Squash-merge the supporting-cast branch onto the main branch. You may use any suitable commit message. The result should be as follows:

gitGraph BT:
  commit id: "Add Joey"
  commit id: "Add Phoebe"
  commit id: "Add Ross"
  commit id: "Add Mike and Janice"

To verify your work:

  • Navigate to anywhere inside the gitmastery-exercises/merge-squash folder (or any sub-folder of it).
  • Run the gitmastery verify command.

To reset the exercise and start over, navigate to the gitmastery-exercises/merge-squash folder and run the gitmastery progress reset command.