Created
November 15, 2015 13:47
-
-
Save ejmr/453edc19dd596e472e90 to your computer and use it in GitHub Desktop.
Update Git Submodules After Each Merge or Pull
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 | |
# | |
# This simple shell script is a Git hook that will automatically | |
# update all submodules any time you perform a merge or pull. | |
# This can be useful because you can do things like... | |
# | |
# $ git checkout master && git pull | |
# | |
# ...without having to remember to potentially update any | |
# submodules in the repository. | |
# | |
# To use this script save it as `.git/hooks/post-merge` in | |
# your repository and make the script executable, e.g. via | |
# `chmod +x .git/hooks/post-merge`. | |
################################################################## | |
git submodule update --init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment