add post-checkout hook, in a default template

(cherry picked from commit d29983a3149e8a6cc660d6f6e94a0511f9e168aa)