3 # post-checkout hook that changes timestamps on changed files
4 # to that one of the last commit (head) if branch was changed
10 if [ "$new_branch" = 1 ]; then
11 commit_date="`git show --format='%cD' | head -1`" &&
12 touch --date="$commit_date" `git diff --name-only HEAD~`