Git Tip #1 - Rebasing including the first commit

Have you ever tried to use git rebase and noticed that it does NOT work on the first commit in a branch?

Is there are way for a rebase to include the first commit?

There actually is! Use the following command line:

    git rebase -i --root

This will trigger an interactive rebase that will include the first commit. Perform the rebase as you normally do.

Note that if you decide to push this back to a remote Git repository be aware you are rewriting your Git history so it will break folks that already have the Git repository pulled down.

Posted August 25, 2016