一直都是使用git stash来暂存临时修改,昨天搜到了这篇文章git stash 命令 ,说是用git stash save -a会将新加入的代码文件同时放入暂存区,我信了,结果没想到带来了坑,想用git stash pop恢复时竟然提示git
xxxx already exists, no checkout Could not restore untracked files from stash
最明显的就是Pod文件夹中的文件都提示这个错误,而Pod文件夹我是在.gitignore中忽略的。 .net
-a表示all,是不单单把新加入的代码文件放入暂存区,还会把用.gitignore忽略的文件放入暂存区。若是想不影响被忽略的文件,那就要用-u,表示untracked files。
rest