From 07412e72edcd24bece8d4248fee523b8577f12cf Mon Sep 17 00:00:00 2001 From: hirosume Date: Tue, 24 Sep 2019 12:42:23 +0000 Subject: [PATCH] add git's submodule cheetsheet --- cheats/git.cheat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cheats/git.cheat b/cheats/git.cheat index 61933f8..70a205f 100644 --- a/cheats/git.cheat +++ b/cheats/git.cheat @@ -61,4 +61,19 @@ git rebase master -S -f # See all open pull requests of a user on Github url::open 'https://github.com/pulls?&q=author:+is:open+is:pr' +# Add a new module +git submodule add [] + +# Update module +git submodule update --init + +# Update module without init +git submodule update + +# Pull all submodules +git submodule foreach git pull origin master + +# Update all submodules +git submodule update --init --recursive + $ branch: git branch | awk '{print $NF}'