From: "Harri Mehtälä" <harri.mehtala@finago.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Bug: git restore --staged --worktree not working in git version 2.26.2.windows.1
Date: Tue, 28 Apr 2020 09:01:48 +0000 [thread overview]
Message-ID: <AM6PR09MB298072F9FEB469130EAEB8F18BAC0@AM6PR09MB2980.eurprd09.prod.outlook.com> (raw)
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ä
next reply other threads:[~2020-04-28 9:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 9:01 Harri Mehtälä [this message]
2020-05-01 8:42 ` Bug: git restore --staged --worktree not working in git version 2.26.2.windows.1 Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM6PR09MB298072F9FEB469130EAEB8F18BAC0@AM6PR09MB2980.eurprd09.prod.outlook.com \
--to=harri.mehtala@finago.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).