I tried the same on my terminal (on linux ubuntu) following this video (timestamp 1:02:34)
https://www.youtube.com/watch?v=8JJ101D3knE&t=2488s
This is what it looks like on my terminal screen
I don't understand what's wrong because even my git version is the latest one I could download
Please help me out.
git restore
was introduced in Git v2.23.0. You're on v2.7.4, which is 16 minor versions behind. The latest release is v2.31.0