O'Reilly logo

Learn Git in a Month of Lunches by Rick Umali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Understanding git rebase

The git rebase command is one of the most powerful commands in Git. It has the ability to rewrite your repository’s commit history, by rearranging, modifying, and even deleting commits. Trying to understand all its capabilities might take you the rest of the book. Instead, you’ll focus on the two primary reasons for using git rebase: keeping up with the repository you’ve cloned, and cleaning up your branch before you merge it.

When you clone a repository, you have a copy of that repository. But your collaborators will often add changes to the original repository. You can use git pull to refresh your clone, but if you’ve created a local branch to isolate your development, you may need to resync your branch ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required