Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use git switch instead of git checkout #307

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Conversation

JKrag
Copy link
Contributor

@JKrag JKrag commented Oct 26, 2021

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
Copy link
Contributor Author

JKrag commented Oct 26, 2021

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

@JKrag
Copy link
Contributor Author

JKrag commented Oct 26, 2021

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 )

The new commands `git switch`and `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 switch`is mentioned,
than it is to debug scripts that are failing miserably.
@JKrag
Copy link
Contributor Author

JKrag commented Oct 26, 2021

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

@RandomSort
Copy link
Contributor

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? 🚀

Copy link

@praqma-thi praqma-thi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change. Now I just need to kick the checkout habit before my next training.. 😅

@JKrag JKrag merged commit 02d1043 into master Oct 29, 2021
@JKrag JKrag deleted the checkout2switch branch October 29, 2021 20:23
@JKrag
Copy link
Contributor Author

JKrag commented Oct 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants