Bug: git restore --staged --worktree not working in git version 2.26.2.windows.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

In git version 2.26.2.windows.1

I am trying to do git restore --staged --worktree for a file. I understood from the documentation that you can do both.

"Specify the restore location. If neither option is specified, by default the working tree is restored. Specifying --staged will only restore the index. Specifying both restores both."


______________________
$ git status 
On branch ...
Your branch is up to date with ...

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   pom.xml

$ git restore --staged --worktree pom.xml

$ git status
On branch ...
Your branch is up to date with ...

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   pom.xml
______________________

It looks like currently I have to do both separately. 

- Harri Mehtälä




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux