Created
January 2, 2019 17:56
-
-
Save elranu/90f6997ba51b4ec89b60feec77efc064 to your computer and use it in GitHub Desktop.
Git submodules helper
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
function git-checkout-b() { | |
git checkout -b $args[0] | |
$cmd = 'git checkout -b ' + $args[0] | |
git submodule foreach $cmd | |
} | |
function git-checkout() { | |
git checkout $args[0] | |
$cmd = 'git checkout ' + $args[0] | |
git submodule foreach $cmd | |
} | |
function git-branch-D() { | |
git branch -D $args[0] | |
$cmd = 'git branch -D ' + $args[0] | |
git submodule foreach $cmd | |
} | |
function git-update(){ | |
git submodule update --remote --merge | |
} | |
function git-push(){ | |
git push --recurse-submodules=on-demand | |
} | |
function git-clone(){ | |
git clone --recursive $args[0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment