Created
July 25, 2012 19:37
-
-
Save fancyremarker/3178096 to your computer and use it in GitHub Desktop.
Sane Git hooks for projects with submodules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Check if this is a branch checkout | |
if [ "${3}" -eq "1" ] ; then | |
git submodule update --init | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git submodule update --init --rebase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To set up a repo with these hooks, run the following from the top-level of your repository: