预推git钩子? [英] pre-push git hook?

查看:127
本文介绍了预推git钩子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在 git push 之前运行压缩脚本,以便用户在尝试将更改推送到远程存储库时,会检查可压缩资产中未提交的更改,放弃 git push ,运行 git commit ,然后运行 git push 再次。

类似于仅使用git挂钩的可能性? 19/2996404rel =nofollow noreferrer> this patch 。



请参阅 .git / hooks /

I would like to run a compression script before git push such that anytime a user tries to push changes to a remote repository, it checks for uncommitted changes in the compressible assets, aborts git push, runs git commit, then runs git push again.

Is something like that possible using only git hooks?

解决方案

Take a look at this patch.

See .git/hooks/ in your repo for sample hooks, maybe you will see some alternative.

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

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