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

git add --intent-to-add and git stash

From
Jonathan Müller <jonathanmueller.dev@gmail.com>
Date
Oct 4, 2020, 18:53 UTC
Message-ID
<b16f61b9-7f0f-38ab-7200-58ad5e659321@gmail.com>
Hello,

when I try to `git stash` a file I have previously added using `git add --intent-to-add`, I get an `error: Entry 'X' not uptodate. Cannot merge.` error. I have to manually remove the file from the index, stash, and add it again after I've popped the stash.

Can `git stash` be taught to handle such files automatically?

Thanks, Jonathan

Message 1 of 1 in “git add --intent-to-add and git stash”
  1. Jonathan MüllerOct 4, 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.