简体   繁体   English

是否有一个git hook在git reset上运行?

[英]Is there a git hook that runs on git reset?

I am using a script that runs as post-checkout and post-merge hook to ensure some permissions on the working copy files. 我使用的脚本作为post-checkoutpost-merge钩子运行,以确保对工作副本文件的某些权限。

Neither of these hooks is run on git reset , so after a git reset --hard the permissions are lost because apparently the files were created freshly. 这些钩子都没有在git reset上运行,所以在git reset --hard ,权限会丢失,因为显然文件是新创建的。

Is there a hook that runs on git reset that I can use to run my permissions script? 是否有一个在git reset上运行的钩子,我可以用来运行我的权限脚本?

No, sorry. 不,对不起 :( :(

This is the full list of hooks from the git documentation, and there's no mention of a reset hook. 这是git文档中的完整钩子列表,并没有提到重置钩子。 : https://www.kernel.org/pub/software/scm/git/docs/githooks.html https//www.kernel.org/pub/software/scm/git/docs/githooks.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM