Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Last active February 23, 2017 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragoonis/ee18195bcca15c2687457fcfb05812e9 to your computer and use it in GitHub Desktop.
Save dragoonis/ee18195bcca15c2687457fcfb05812e9 to your computer and use it in GitHub Desktop.
# **** clone down all the projects given their branch name ****
if [ ! -d $DIR/shop/.git ]; then
printf "cloning shop\n"
git clone -b ${SHOP_BRANCH} --single-branch git@repo.url/shop.git $DIR/shop
cd $DIR/shop git update-ref -d refs/heads/origin/${SHOP_BRANCH}
else
printf "fetching shop\n"
cd $DIR/shop && git fetch && git checkout origin/${SHOP_BRANCH}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment