git-novice
git-novice copied to clipboard
change the use of git checkout to git restore
I noticed that my version of git ( (2.36.1.windows.1) doesn't prompt the user to use git checkout to restore files. It uses git restore. This is much safer, and can't lead to nasty stuff like detached heads, so probably better for learners. I went ahead and changed all the references to git checkout to git restore.
What did I update:
- I changed git output to show what my version of git shows
- I replaced all instances of git checkout with the relevant git restore command, including in exercises.
- I changed two pictures to use git restore. However, I don't have a SVG editor, so it looks fairly ugly. So that probably needs some work still.
Thank you!
Thank you for your pull request :smiley:
:robot: This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.
If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
- :dart: correct output
- :framed_picture: correct figures
- :question: new warnings
- :bangbang: new errors
Rendered Changes
:mag: Inspect the changes: https://github.com/swcarpentry/git-novice/compare/md-outputs..md-outputs-PR-927
The following changes were observed in the rendered markdown documents:
05-history.md | 150 ++++++++++++++--------------------------------
fig/git-restore.svg (new) | 111 ++++++++++++++++++++++++++++++++++
fig/git_staging.svg | 2 +-
md5sum.txt | 2 +-
4 files changed, 157 insertions(+), 108 deletions(-)
What does this mean?
If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.
This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.
:stopwatch: Updated at 2024-07-18 07:32:22 +0000
Hi,
Sorry for the slow reply, I was on a holiday, so it got to the bottom of the pile. I have added a new commit that should change all the remaining instances of checkout to restore.
Cheers, koen
See #691
@kekoziar are you happy with the changes now? I'm happy to resolve the conflict myself, it's minor.