Skip to content

Instantly share code, notes, and snippets.

@cbrunnkvist
Created November 8, 2010 17:24
Show Gist options
  • Save cbrunnkvist/667963 to your computer and use it in GitHub Desktop.
Save cbrunnkvist/667963 to your computer and use it in GitHub Desktop.
Script for push & synch of updates to git submodule
#!/bin/sh
set -x
git pull
git submodule update
pushd config/private/
git stash
git checkout master
git pull
git stash pop
git add .
git commit -va
git push origin master
popd
git commit -v config/private -m'Updated submodule'
set +x
echo '***NOTE***: You will now have to run "git push origin master" manually, just in case.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment