Learn Git Rebase Interactively
source link: https://zwischenzugs.com/2018/04/05/learn-git-rebase-interactively/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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 Way, Learn Bash the Hard Way or Docker in Practice
Get 39% off Docker in Practice with the code: 39miell2
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK