我有一个脏工作目录,使用git stash save -p
来选择性地存储一些更改。我的意图是将以前的一个大提交拆分成两个较小的提交。现在的问题是我不小心存储了错误的内容,所以我想重新做一遍。我尝试过执行git stash pop
,如这个问题中建议的那样,但执行时却出现了以下错误:
error: Your local changes to the following files would be overwritten by merge:
my_file.js
Please, commit your changes or stash them before you can merge.
Aborting