Skip to content

Instantly share code, notes, and snippets.

@gmeligio
gmeligio / githooks-post-checkout
Last active February 22, 2026 16:47
git hook to auto clean up merged local branches
# 1. Create ~/.githooks
# -----------------------------------------------
mkdir -p ~/.githooks
git config --global core.hooksPath ~/.githooks
# -----------------------------------------------
# 2. Create ~/.githooks/post-checkout:
# -----------------------------------------------