Have need to prevent root from updating a git (working) directory. Reasoning includes but not limited to: preventing undersired file-system ownership changes.
None of the git hooks seem to prevent a fetch/merge/pull before it happens, similar to pre-commit hook. Or at least, nothing I see here (or in man page):
http://www.analysisandsolutions.com/code/git-hooks-summary-cheat-sheet.htm
Thoughts?
The only way I saw this not resolved but at least “mitigated” was through a wrapper for the git command:
All git commands go through this wrapper which proceeds if the user id is not root.