我想隐藏未跟踪的文件,但我继续传递错误的选项.对我来说这听起来是对的:
git stash save [-a|--all]
Run Code Online (Sandbox Code Playgroud)
但实际上这也隐藏了文件.正确的是:
git stash save [-u|--include-untracked]
Run Code Online (Sandbox Code Playgroud)
当我运行git stash save -a并尝试git stash pop它时,我得到所有被忽略文件的无数错误:
path/to/file1.ext already exists, no checkout
path/to/file1.ext already exists, no checkout
path/to/file1.ext already exists, no checkout
...
Could not restore untracked files from stash
Run Code Online (Sandbox Code Playgroud)
所以命令失败了.
如何恢复跟踪和未跟踪的更改?git reflog不存储存储命令.