1. Learn
  2. /
  3. Courses
  4. /
  5. Advanced Git

Connected

Exercise

Interactive rebase

You've completed the enhancements to the data transformation module on your feature/transform branch.

Before merging this feature into the main branch, your team lead has asked you to clean up the commit history to make it more coherent and easier to review.

You decide to use interactive rebase to combine your commits into a single, comprehensive commit that clearly describes all the changes made for this feature.

Instructions 1/3

undefined XP
  • 1
    • Using git log, review the last 2 commits in the feature_transform branch.
    • Assume you are already on the feature_transform branch.
  • 2
    • Start an interactive editor to rebase the last 2 commits in feature_transform.
    • In the interactive rebase editor, keep the first commit using pick and fixup the next one into it.
    • Once you're finished, exit the editor by pressing CTRL and X at the same time to save the file.
  • 3
    • Review the updated history for the last 2 commits in the feature_transform branch.