Created
April 14, 2016 03:55
-
-
Save key-amb/1e4d6bbc85d16eb960dcf67022c6e1db to your computer and use it in GitHub Desktop.
Makefile to update git repository 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
.PHONY: update update-all all | |
update: | |
git pull origin master | |
git submodule update --init | |
update-all: update | |
git submodule foreach git pull origin master | |
all: update-all |
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
% make # to update | |
% make all # to update with submodules' update out of this repository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
specific improvement:
$ make
command will pull all submodules and sync, then checkout the main branch