当我运行新版本2.13.0.windows.1的新命令
如果我进入该文件所在的目录并执行
如果我运行命令
所以,是我的
stash -p -- {pathspec}
时,如下所示:
git stash -p -- AB.Dir1/Dir2/DestinationHierarchyCreator.cs
它报告了错误:
然而,当我执行error: pathspec 'AB.Dir1/Dir2/DestinationHierarchyCreator.cs' did not match any file(s) known to git.
git status
时,我从中复制文件的位置,它会报告:Your branch is up-to-date with 'origin/project/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: AB.Dir1/Dir2/DestinationHierarchyCreator.cs
如果我进入该文件所在的目录并执行
git stash -p -- DestinationHierarchyCreator.cs
,它会失败并显示相同的错误。如果我运行命令
git stash -p -- *.cs
,那么我就可以将片段保存到stash中。所以,是我的
git stash -p
选项的理解有误,还是我针对单个文件的路径规范处理有误或其他原因导致的呢?