每当我在完成 git stash -a
后运行 git stash apply
和 git stash apply --index
我什至得到相同的结果尽管我的 WIP 目录有暂存更改、未暂存(但跟踪更改)和未跟踪文件。
这正常吗? git stash apply
不应该返回索引吗?
最佳答案
使用 git stash apply
重新应用对文件的更改,但不会重新暂存之前暂存的文件。
如果你想这样做,你可以添加 --index
选项来告诉命令尝试重新应用暂存的更改。
关于git - git stash apply 和 git stash apply --index 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48645729/