{"thread":{"id":"60877","subject":"git bug","startedAt":"2024-02-08T19:33:01Z","lastAt":"2024-02-08T19:33:01Z","messageCount":1,"participants":["Justin Tang"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"488249","messageId":"CAO18WYyQas36PNz20+pRt0usGqZwrhVYDbQfPZnHEVD8esfoyQ@mail.gmail.com","threadId":"60877","inReplyTo":null,"subject":"git bug","fromName":"Justin Tang","fromEmail":"jutang@ixl.com","sentAt":"2024-02-08T19:32:48Z","receivedAt":"2024-02-08T19:33:01Z","isPatch":false,"sender":{"key":"jutang@ixl.com","avatar":null},"body":"Thank you for filling out a Git bug report!\n\nPlease answer the following questions to help us understand your issue.\n\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\n\nadd a new file to the git directory, untracked. with some path path/to/file\n\n\nI wanted to use git diff on untracked files, so I added the file as an\n\nempty file to git, with:\n\n\ngit add --intent-to-add path/to/file\n\n\nThen I wanted to stash my changes, with:\n\n\ngit stash save\n\n\nWhat did you expect to happen? (Expected behavior)\n\n\nMy changes to be stashed.\n\n\nWhat happened instead? (Actual behavior)\n\n\nI can't stash my changes, git stash save or git stash save --include-untracked.\n\nI was getting this error:\n\n\nerror: Entry 'path/to/file' not uptodate. Cannot merge. Cannot save\nthe current worktree state\n\n\nWhat's different between what you expected and what actually happened?\n\n\numm\n\n\nAnything else you want to add:\n\nAnything else you want to add:\n\n\nI 'fixed' this by removing the empty file with git rm -r --cached path/to/file\n\n\nPlease review the rest of the bug report below.\n\nYou can delete any lines you don't wish to share.\n\n\n\n[System Info]\n\ngit version:\n\ngit version 2.38.4\n\ncpu: x86_64\n\nno commit associated with this build\n\nsizeof-long: 8\n\nsizeof-size_t: 8\n\nshell-path: /bin/sh\n\nuname: Linux 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38\nUTC 2020 x86_64\n\ncompiler info: gnuc: 10.2\n\nlibc info: glibc: 2.17\n\n$SHELL (typically, interactive shell): /bin/bash\n\n\n\n[Enabled Hooks]\n\ncommit-msg\n\npost-commit\n\npost-rewrite\n\npre-commit\n\npre-push\n\nprepare-commit-msg\n"}]}