Difficulty: easy
Estimated Time: 10 minutes

In this course you will learn how the git interactive rebase works. When you're done you will know how to replay your work on top of another branch and re-organize your commits to be as clean as possible before you merge back in to your master branch.

Git Rebase

Step 1 of 5

Add Initial Content to the Master Branch

We are on the master branch in our new git repository. Let's create a file and add some history.

touch Foo.java

Next, let's add some content to this new file

public class Foo { public Foo() { System.out.println("I'm instantiated!"); } }

Next, we'll commit our changes. First we need to add the file to git for tracking.

git add .

Then we'll commit

git commit -m "MASTER -- My first commit"

Let's check out the git history to confirm that everything is working as expected

git log