From 949dc5550371d3cfdfe0c2bfd6e53cdfbe3069c5 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Mon, 15 Jun 2015 20:45:51 -0400 Subject: [PATCH] add tools to help manage submodules --- link_git_modules | 11 +++++++++++ update_git_modules | 3 +++ 2 files changed, 14 insertions(+) create mode 100755 link_git_modules create mode 100755 update_git_modules diff --git a/link_git_modules b/link_git_modules new file mode 100755 index 0000000..deb7cd1 --- /dev/null +++ b/link_git_modules @@ -0,0 +1,11 @@ +#!/bin/sh + +git submodule foreach git branch --set-upstream master origin/master + +git submodule foreach git checkout master + +# If one module needs to follow a different branch: +# cd some_module +# git branch --set-upstream our-branch origin/some-branch +# git checkout our-branch +# cd .. diff --git a/update_git_modules b/update_git_modules new file mode 100755 index 0000000..ff78f96 --- /dev/null +++ b/update_git_modules @@ -0,0 +1,3 @@ +#!/bin/sh + +git submodule foreach git pull origin -- 2.40.0