Last active
October 15, 2015 04:27
-
-
Save t-mart/4535678144f529d66333 to your computer and use it in GitHub Desktop.
A script to pull submodules to their origin/master. Meant to be used as a git hook.
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 | |
| # | |
| # To enable this hook, place this file at: | |
| # <repo-base-dir>/.git/hooks/pre-commit | |
| printf "Updating submodules to origin master..." >&2 | |
| git submodule update --rebase --remote | |
| STATUS=$? | |
| if [ $STATUS -eq 0 ]; then | |
| echo "done" >&2 | |
| else | |
| echo "error!" >&2 | |
| fi | |
| exit $STATUS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment