Py学习  »  mat  »  全部回复
回复总数  1
8 年前
回复了 mat 创建的主题 » git stash:“不能应用于脏的工作树,请准备更改。”

我也发现了 Mathias Leppich's solution 为了工作顺利,我在global.gitconfig中添加了一个别名。

[alias]
        apply-stash-to-dirty-working-tree = !git stash show -p | git apply && git stash drop

现在我可以打字了

git apply-stash-to-dirty-working-tree

这对我很有用。

(您的里程可能因这个长别名而异。但我喜欢在完成bash时使用冗长的语句。)