The new command, git restore <file>
does not seem to have much documentation yet. Does it do exactly the same thing as git checkout -- <file>
?
I do not understand the explanation of the new commands in the release notes.
In Git 2.23 Release Notes:
- Two new commands "git switch" and "git restore" are introduced to split "checking out a branch to work on advancing its history" and "checking out paths out of the index and/or a tree-ish to work on advancing the current history" out of the single "git checkout" command.
https://github.com/git/git/blob/master/Documentation/RelNotes/2.23.0.txt