Unlock productivity
and master version control with the complete guide on rebasing in Git.

⭐️⭐️⭐️⭐️⭐️ Rated 5 stars on Gumroad

Now available as ePub and Mobi!

Rebase Book Cover

An IndieHackers product used by hundreds of developers by Picture of Pascal Precht @PascalPrecht. Read the full story.

Take your productivity to the next level
in less than 200 pages. Learn the power of rebasing in Git and take full control of your commit history.

🎯 Optimized & Effective

Short and to the point. REBASE gives you a streamlined approach to be your most effective self using Git.

💪 Become a master

Get work done faster. Learn how to best re-arrange changes, split commits or combine them.

Timeless Content

Add Git to your skills for lifelong career benefit. Thousands rely on Git daily and the number is only growing.

Picture of Jad Joubran

"Reading this book has been extremely valuable.
'Detached Head' always made me worry - not anymore!"

Jad Joubran
Google Developer Expert
Creator of Learn JavaScript & React Tutorial

What's inside

Packed with tips and tricks to improve your productivity and maintain high flexibility within your code base.

  • Repository under the hood
  • The anatomy of a Git commit
  • Understanding Git objects
  • A branch is just a pointer
  • Concept of a rebase
  • "Rebase + Merge" vs. "Just Merge"
  • How to perform a simple rebase
  • Rebasing interactively
  • Splitting and squashing commits
  • Automated testing during a rebase
  • Cherry-picking commits
  • "I'll fix it later" Workflow

Includes hand-drawn illustrations

This book is for you if...

  • 😅 You feel rather uncomfortable using Git
  • 😬 You know how to add, commit, push and pull, but that's it
  • 😰 You don't know what to do when you've "messed up"
  • 😑 You don't know what your Git tool is doing behind the scenes
  • 😲 You want limitless version control
  • 🤩 You want to fix all of the above without wasting time

If at least one of those applies, this book is for you.

Yes, this book is for me!

Picture of Michael Bromley

"From reading that book, the mental model of git branches as pointers stuck for me for the first time. I use that model almost daily and git became drastically easier to work with."

Michael Bromley
Software Engineer & Creator of Vendure.io

Table of contents

Part 1

  • Chapter 1: A quick look behind the scenes
    • What's in a repository
    • Working directory, index, repository
    • Where our data ends up
    • What we've learned
  • Chapter 2: The anatomy of a git commit
    • What's up with those hashes
    • Git objects
    • Commit histories
    • What we've learned
  • Chapter 3: A branch is just a pointer
    • Understanding branches
    • Branches move with you
    • Revisiting HEAD
    • A note about unreachable commits
    • What we've learned
  • Chapter 4: Merge strategies
    • Understanding the three-way merge
    • Fast-forward merge
    • A note about merge conflicts
    • Cancelling a merge
    • Undoing a merge
    • Other strategies
    • What we've learned
  • Chapter 5: A quick detour on reset methods
    • Reset modes
    • Soft mode
    • Mixed mode
    • Hard mode
    • What we've learned

Part 2

  • Chapter 6: Rebasing
    • The what and why
    • Performing a simple rebase
    • Dealing with conflicts
    • Working with remotes
    • What we've learned
  • Chapter 7: Interactive Rebasing
    • Reordering and removing commits
    • Squashing commits
    • Splitting commits apart
    • Rebasing a root commit
    • Executing programs during a rebase
    • What we've learned
  • Chapter 8: Cherry-picking
    • Understanding a cherry-pick
    • Cherry-picking ranges of commits
    • What we've learned
  • Appendix A: Useful Git aliases
    • Compact, annotated commit histories
    • Work-In-Progress commits
    • "Wiping" commits
    • Smarter git diffs
    • Undoing commits
  • Appendix B: "I'll fix it later" Workflow
    • Work-In-Progress is a good thing
    • Crafting semantic commit histories
    • Using reflog to restore lost commits
  • Appendix C: Generating change logs from commit histories

I want this!

"The deep dive on the behind the scenes stuff, I think, is what truly unlocks the power and simplicity of Git in this book."

– Drew

"I really enjoyed the chapter on merging strategies. The diagrams and descriptions made things as clear as never before!"

– Henry

"I didn't know about the differences between git reset modes. This was super helpful!"

– Patxi

"The most valuable thing I've learned was interactive rebase and the anatomy of commits."

– Aishwarya

"It was worth every penny!"

– Berhan

"My biggest take away was the chapter about conventional commits and automated changelog generation. That was a game changer."

– Shane

Read full review →

Frequently Asked Questions

  • I really am a beginner... is this book still for me?

    Absolutely! While rebasing in itself is probably considered a more advanced topic, REBASE talks you through all the basics in Git needed to make understanding rebasing easy. Part 1 of the chapter breakdown has got you covered!

  • Will I be able to apply the techniques taught in the book immediately?

    You bet! In fact, the book is written in such a way that you'll get a hands-on experience from the get go. Just run and study all commands as REBASE guides you through them.

  • What ebook formats do I get?

    Fully supported and tested formats of REBASE are ePub and Mobi, for Apple iBooks and Kindle readers and apps respectively. You'll also get a PDF, but there are some tiny layout issues. I haven't figured those out yet, but the PDF is completely readable nonetheless!

Meet the author

Pascal Precht is a software engineer, author, speaker and Google Developer Expert alumni. He is the founder of thoughtram where he trained thousands of people in Git and specialized web technologies. Pascal authored and published 60+ technical articles and speaks at various developer conferences.