Welcome to mirror list, hosted at ThFree Co, Russian Federation.

install_dev_githooks.sh - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ace3cb0b6c215cfe53be114074af0070f8d972ea (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
echo Installing post-receive hook which recursively forces all
echo submodules to latest commit after every git pull
cat <<EOT >> .git/hooks/post-merge
#!/bin/sh
git submodule foreach --recursive 'branch=\$(git config -f \$toplevel/.gitmodules submodule.\$name.branch); [ \"\$branch\" = \"\" ] && branch=master; git checkout \$branch; git merge origin/$branch;'
EOT
chmod +x .git/hooks/post-merge