社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  mat  »  全部回复
回复总数  1
9 年前
回复了 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时使用冗长的语句。)