Skip to content

Instantly share code, notes, and snippets.

@dario1985
Created November 7, 2011 14:31
Show Gist options
  • Save dario1985/1345166 to your computer and use it in GitHub Desktop.
Save dario1985/1345166 to your computer and use it in GitHub Desktop.
git-submodule
#!/bin/bash
CURRENT_DIR=$( pwd )
ARGS=$*
function move () {
from_path=$1
to_path=$2
#vim .gitmodules
#git add .gitmodules
#mv ext ext2
#git rm -r --cached ext
#git add ext2/*
#git commit
}
function main () {
if [[ $ARGS[0] == 'mv' ]]; then
move $ARGS[1] $ARGS[2]
else
git submodule $ARGS
fi
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment