eficode-academy / git-katas

A set of exercises for deliberate Git Practice
MIT License
1.32k stars 860 forks source link

Make the rebase-exec exercise a little more intuitive #242

Open praqma-thi opened 4 years ago

praqma-thi commented 4 years ago

The scenario painted in the rebase-exec exercise is a little counter-intuitive. The commits we're rebasing add a bunch of text files, but we never interact with them. One of the commits breaks the test script, which we then need to fix by basically undoing the changes to the test script.

Perhaps moving to a scenario where the test file actually tests a different script which the commits modify would be a little more intuitive.


I'm not sure how we could achieve this yet. My original suggestion was having a script called zero.sh which does some simple math and exits with the result, e.g. exit (2 - 1 -1), and have test.sh just:

echo "Asserting zero.sh exits 0.
./zero.sh
exit $?

The commits being rebased could then modify the zero.sh script, the breaking commit making the math not end up at 0.

It's also an arcane scenario, but perhaps a little more intuitive.