eficode-academy / git-katas

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

Update to use git switch instead of git checkout #307

Closed JKrag closed 2 years ago

JKrag commented 2 years ago

The new commands git switchand git restore were introduced in 2.23 back in August 2019, and are much cleaner than the old git checkout, so I believe that we should be teaching the new way, not the old.

While git switch and git restore are in principal still marked as experimental in the documentation, they are here to stay. Even output from commands like git status, have gone away from suggesting git checkout.

This commit goes through all the README files and makes appropriate changes to recomend git switch instead of git checkout (and git switch -c instead of git checkout -b)

The actual setup scripts are still left untouched for maximum compatablility. If you have e.g. participants in a training using very old Git versions, it is still a lot easier to tell them to use git checkout when git switchis mentioned, than it is to debug scripts that are failing miserably.

JKrag commented 2 years ago

If #308 gets approved and merged, I will manually rebase this on top to make sure it is clean.

JKrag commented 2 years ago

I might suggest that we then tag this new version with 0.3.0 to indicate that is does at least somewhat change the learning content (and thus might not be 100% compatible with e.g. the "Practical Git" book by @RandomSort )

JKrag commented 2 years ago

I have now rebased this branch on top of the #308 markdown cleanup and fixed a single conflict.

RandomSort commented 2 years ago

Thank you for the thought. It is nice to have it tagged - then I can always publish an errata :) Also, this makes me think - what would it take to get the katas to 1.0? 🚀

JKrag commented 2 years ago

The PR is now merged, and the resulting commit tagged with 0.3.0. @RandomSort You raise an excellent question about when we can go to a 1.0.0 version number.

Instead of taking this discussion here, I have created #309 for this topic.