1

I am new to linux, and I have just installed git using,

sudo apt-get install git-all

When I attempted to restore a file after making modifications, I get the following error:

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

I did some research, and it turns out that git restore was not implemented until git version 2.23.0. I then ran,

git --version

And saw that I had 2.20.1 installed. To update git, I ran,

sudo apt-get update

sudo apt-get --only-upgrade install git-all

It told me that git-all is already the newest version (1:2.20.1-2+deb10u3), but this is not the latest version of git. The latest version of git is 2.34.1. What is happening here and how can I update git?

1
  • 2
    Debian Buster only goes up to 2.20 for git. Either install from source, or upgrade to bullseye. There are probably more options, but I am not familiar enough with Debian to advise on those. Commented Jan 14, 2022 at 3:38

1 Answer 1

2

You can download the latest version here: https://git-scm.com/download/linux

URL: https://www.kernel.org/pub/software/scm/git/git-2.34.1.tar.gz

then make it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.