Learn Git Rebase Interactively

If you’ve ever wondered what a rebase is, then you could try and read up on it and understand it from the man pages. Many people struggle with this, and I was among them. The man pages have been improved lately, but are still daunting to the casual user.

A more effective way to learn is to be thrown into it at the deep end by being forced to do it at work. Unfortunately this can be a terrible way to learn as you are panicked about breaking something in some way you don’t understand.

So I came up with an interactive tutorial that you can run to learn what a rebase is.

Run The Tutorial

Running the tutorial has only two dependencies: pip and docker.

If you have those, then run:

pip install shutit # You might need sudo for this, depending on your pip setup
git clone https://github.com/ianmiell/git-rebase-tutorial
cd git-rebase-tutorial
./run.sh

Video

Here’s a demo of it in action:

Features

At any point, you can hit these button combinations (hit both at the same time, CTRL key first):


CTRL-]

This submits your current state for checking.


CTRL-h

Gives you a hint.


CTRL-g

Restores the state of the tutorial to a pristine state at this stage.


CTRL-s

Skips the current stage of the tutorial.


CTRL-q

Quits the ShutIt session.


Problems?

Raise an issue here.

If you can reproduce with ./run.sh -l debug and post the output, then that’s ideal.



If you like this post, you might like  Learn Git the Hard WayLearn Bash the Hard Way or Docker in Practice

learngitthehardway

hero

Get 39% off Docker in Practice with the code: 39miell2


 

2 thoughts on “Learn Git Rebase Interactively

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.