预推git钩子? [英] pre-push git hook?
问题描述
我希望在 git push
之前运行压缩脚本,以便用户在尝试将更改推送到远程存储库时,会检查可压缩资产中未提交的更改,放弃 git push
,运行 git commit
,然后运行 git push
再次。
类似于仅使用git挂钩的可能性? 19/2996404rel =nofollow noreferrer> this patch 。
请参阅 I would like to run a compression script before Is something like that possible using only git hooks? Take a look at this patch. See 这篇关于预推git钩子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! .git / hooks / $ c $在你的回购示例钩子中,也许你会看到一些选择。
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..git/hooks/
in your repo for sample hooks, maybe you will see some alternative.