git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug: "git restore --staged" on a newly created repository

From
XZXirui Zhao <zhaoxirui434@gmail.com>
Date
May 26, 2020, 06:18 UTC
Message-ID
<1F3FD418-38D2-4A10-A882-666D4327F993@gmail.com>

Tested on git version 2.27.0-rc1 (latest build from master branch on github) and 2.26.2 `git restore --staged file` on a newly created repository outputs error "fatal: could not resolve HEAD", but `git reset file` correctly unstages the file.

Next: Jeff King
Message 1 of 2 in “Bug: "git restore --staged" on a newly created repository”
  1. Xirui ZhaoMay 26, 2020
  2. Jeff KingMay 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.