Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Moving Things Around

Goal

  • Flip 2 commits in a branch.
  • Send 2 commits in 2 separate branches.
  • Move a file from a commit to a future one.
  • Fix a typo, send it 10 commits ago.
  • Rebase 2 branches simultaneously.
  • Reflect on the new unprecedented history-bending abilities you just gained. Invent new audacious (but useful) moves.
  • Profit.

You can do all sort of black magic sorcery with just 2 commands:

OperationCommand
Move a Change somewhere elserebase
Move the changes you made somewhere elsesquash

Best of all, they only take a few minutes to learn.