相关疑难解决方法(0)

如何从"git stash save --all"中恢复?

我想隐藏未跟踪的文件,但我继续传递错​​误的选项.对我来说这听起来是对的:

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不存储存储命令.

git git-stash

13
推荐指数
1
解决办法
3905
查看次数

标签 统计

git ×1

git-stash ×1