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

Lost files after git stash && git stash pop

From
TFTill Friebe <friebetill@gmail.com>
Date
Jul 21, 2023, 17:31 UTC
Message-ID
<5260C6A0-C53C-4F6D-B899-6AD8601F8458@gmail.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue) ``` git init mkdir README touch README/README git add . git commit -m "Init project" echo "Test" > README/README mv README/README README2 rmdir README mv README2 README git stash git stash pop ```

What did you expect to happen? (Expected behavior) I expected that after the `git stash pop` the README file would be back.

What happened instead? (Actual behavior) This README with "Test" file was deleted and I lost 5 hours of work.

What's different between what you expected and what actually happened? The file doesn't exist anymore and I can't recover it.

Anything else you want to add: This is just a reproducible example.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.39.2 (Apple Git-143) cpu: arm64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64 compiler info: clang: 14.0.3 (clang-1403.0.22.14.1) libc info: no libc information available $SHELL (typically, interactive shell): /bin/zsh

[Enabled Hooks]
Next: Torsten Bögershausen
Message 1 of 15 in “Lost files after git stash && git stash pop”
  1. Till FriebeJul 21, 2023
  2. Torsten BögershausenJul 22, 2023
  3. Phillip WoodJul 23, 2023
  4. Torsten BögershausenJul 23, 2023
  5. Phillip WoodJul 24, 2023
  6. 1/1 git stash needing mkdir deletes untracked filetboegi@web.de, Aug 8, 2023
  7. Torsten BögershausenAug 8, 2023
  8. Eric SunshineAug 8, 2023
  9. Phillip WoodAug 9, 2023
  10. Torsten BögershausenAug 9, 2023
  11. Phillip WoodAug 15, 2023
  12. Torsten BögershausenAug 15, 2023
  13. Junio C HamanoAug 15, 2023
  14. Junio C HamanoAug 9, 2023
  15. Phillip WoodAug 15, 2023

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.