-
Notifications
You must be signed in to change notification settings - Fork 902
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
Conversation
If #308 gets approved and merged, I will manually rebase this on top to make sure it is clean. |
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.
1958429
to
8aad342
Compare
I have now rebased this branch on top of the #308 markdown cleanup and fixed a single conflict. |
Thank you for the thought. |
There was a problem hiding this 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.. 😅
The PR is now merged, and the resulting commit tagged with 0.3.0. Instead of taking this discussion here, I have created #309 for this topic. |
The new commands
git switch
andgit restore
were introducedin 2.23 back in August 2019, and are much cleaner than the
old
git checkout
, so I believe that weshould be teaching the new way, not the old.
While
git switch
andgit restore
are in principal still marked asexperimental 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 ofgit checkout
(and
git switch -c
instead ofgit 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.