我可以禁用git stash吗? [英] Can I disable the git stash?

查看:76
本文介绍了我可以禁用git stash吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我宁愿进行临时提交,也不愿使用git stash.更重要的是,我希望我的混蛋经验较少的同事避免藏匿它.

I would rather make temporary commits than use the git stash. More importantly, I would prefer my colleauges with less experience with git avoid the stash.

是否可以禁用git stash,以便与其交互的命令终止并出现错误?

Is there a way to disable the git stash so that commands that interact with it terminate with an error?

感谢您提出的建议,但我真正要寻找的是对字面问题的是"或否"答案,如果可能的话.

Thanks for the answers suggesting what I can do instead, but what I am really looking for is a "yes" or "no" answer, if possible with some justification, to the literal question.

推荐答案

用脚本替换它:

cd /usr/lib/git-core
mv git-stash git-stash.backup
echo "#!/bin/sh
echo git stash is disabled, please commit your changes" > git-stash
chmod a+rx git-stash

这篇关于我可以禁用git stash吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆