summaryrefslogtreecommitdiffstats
path: root/cheats/git.cheat
diff options
context:
space:
mode:
Diffstat (limited to 'cheats/git.cheat')
-rw-r--r--cheats/git.cheat16
1 files changed, 15 insertions, 1 deletions
diff --git a/cheats/git.cheat b/cheats/git.cheat
index 85b7bbb..3708cc0 100644
--- a/cheats/git.cheat
+++ b/cheats/git.cheat
@@ -25,7 +25,6 @@ git remote rename <old_remote_name> <new_remote_name>
git remote remove <remote_name>
# Checkout to branch
-# Change branch
git checkout <branch>
# Displays the current status of a git repository
@@ -80,4 +79,19 @@ navi fn url::open 'https://github.com/pulls?&q=author:<user>+is:open+is:pr'
git fetch origin pull/<pr_number>/head:pr/<pr_number> \
&& git checkout pr/<pr_number>
+# Add a new module
+git submodule add <repository> <path>
+
+# 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}'