简体   繁体   中英

git tracking one file changes

We have a large repo and a lots of commiters.

I want to track history of a single file. Whenever someone changes it (push changes to my central repository), I get the email with diff and author name.

I know that making a pre-commit hook, to do so would resolve a problem for me, however I would have to propagate the script to all commiters.

Is there a pre-merge (or post-merge) hook?

Temporary solution would be a cron task checking every 10 min, who changes the file.

Yes, there is a post-merge hook. Based on your description, however, you probably want to use the post-receive hook on your "central" repository. The Pro-Git hooks page describes it quite well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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