0

SparkyLinux (based on Debian). When I use git restore command, it says, that this command doesn't exist... On my previous OS installations this command was available, also it is available on my Android device (from Termux repo). But here and now this does not work. Here is the output:

$ git restore
git: 'restore' is not a git command. See 'git --help'.

The most similar command is
        remote

What's happened? I've tried reinstalling, but this didn't work. My git version is 2.20.1 (on my smartphone it is 2.26.2).

  • 1
    `git restore` (and `git switch`) are new in Git 2.23. They essentially split `git checkout` in half, into its "sub-commands that check before destroying unsaved work" (`git switch`) and "sub-commands that gleefully destroy unsaved work the moment you suggest doing so" (`git restore`). – torek May 01 '20 at 12:11
  • 1
    Your options are to upgrade Git, or use the old fallback `git checkout` command and be careful when you use it. – torek May 01 '20 at 12:12

0 Answers0