-
Notifications
You must be signed in to change notification settings - Fork 2k
Rewrite recommend git restore
instead of git reset
#1529
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
Comments
This comment has been minimized.
This comment has been minimized.
git restore
instead of git reset
, when MacOS and Debian stable update their Gitgit restore
instead of git reset
, when macOS and Debian stable update their Git
I would love to change while reading the book but i don't know if we are still waiting something. I have to say that it was a little weird to read about I'm in favor to change to |
Thank you for offering to help improve the book! We're only waiting for Debian and macOS to come with a version of Git that has the Maybe Debian LTS and macOS latest version now have the correct version of Git?
I'll let @ben figure out what to do here. 😉 |
Hay cấp nhat |
Version of Git for Debian 11Looks like Debian 11 now comes with Git version The GitHub Blog mentions that Git version So Debian 11 should have access to Version of Git for macOSThere are multiple ways to get Git on macOs. 3 HomebrewPeople that use Homebrew get When installing XcodeI don't know what version of Git comes with a fresh install of Xcode... Footnotes |
I'm on a mac with the latest OS, and:
So I think we're ready to make this change now. |
git restore
instead of git reset
, when macOS and Debian stable update their Gitgit restore
instead of git reset
Uh oh!
There was an error while loading. Please reload this page.
Which version of the book is affected?
This will affect our mainline branch, when macOS and Debian stable include newer versions of Git that have the
git restore
command.Describe the bug:
When stable platforms use newer versions of Git, we should not be using
git reset
as the recommended way to do things, and instead promotegit restore
usage whenever possible.Steps to reproduce:
Just look through the book and note that we use
git reset
instead ofgit restore
.Expected behavior:
What the rewrite should do:
git restore
instead ofgit reset
where possible.git restore
where Git recommends we use it.git restore
to unstage things.[NOTE]
explaining thatgit reset
is the "old way" of doing things.restore
andreset
, and when you should use each of those commands.Screenshots:
Additional context:
We have also discussed Git restore at the following places:
git restore
#1441The text was updated successfully, but these errors were encountered: