-
-# Updates all the branches in the local repo (clones if it does not exist)
-if [ -d $OSM_MDG ]; then
- INFO "reusing existing workspace"
- cd $OSM_MDG
- git pull --all
- #git checkout master #to make sure that we are in the right branch before pulling the code
- #git pull
-else
- INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
- git clone $OSM_GIT_URL/$OSM_MDG
- cd $OSM_MDG
- for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done