次のサイズ測定に基づいて、.git/hooks/* ファイルを削除するだけで、非常に小さな .git リポジトリを実現できます。幸いなことに、フックを削除しても完全に安全です (フックなし、アクションなし)。
ebg@taiyo(509)$ du -sh foo/.git
52K foo/.git
ebg@taiyo(510)$ du -sh foo/.git/*
4K foo/.git/HEAD
0B foo/.git/branches
4K foo/.git/config
4K foo/.git/description
36K foo/.git/hooks
4K foo/.git/info
0B foo/.git/objects
0B foo/.git/refs
ebg@taiyo(511)$ du -sh foo/.git/hooks/*
4K foo/.git/hooks/applypatch-msg.sample
4K foo/.git/hooks/commit-msg.sample
4K foo/.git/hooks/post-update.sample
4K foo/.git/hooks/pre-applypatch.sample
4K foo/.git/hooks/pre-commit.sample
8K foo/.git/hooks/pre-rebase.sample
4K foo/.git/hooks/prepare-commit-msg.sample
4K foo/.git/hooks/update.sample
rm -f .git/hooks/*.sample
演奏した後は演奏するだけですgit init
。シェル関数にバンドルします。もちろん、あなたが本当にフックを切ることに専念しているなら、あなたはすることができますsudo rm -f <path-to-git-install>/share/git-core/templates/hooks/*
それ以上を削除する必要がある場合は、git を壊す領域に入ります。