source BRANCHES.sh
-for i in grundlagen__docker $BRANCHES;
-do
- declare -n branch=${i}
- echo -e "\nResetting $branch to origin/$branch\n\n"
- git checkout $branch
- git reset --hard origin/$branch;
-done
+if [ "$1" == "" ]
+then
+ echo "No Tag-Prefix specified: Resetting to remote branches"
+ for i in grundlagen__docker $BRANCHES
+ do
+ declare -n branch=${i}
+ echo -e "\nResetting $branch to origin/$branch\n\n"
+ git checkout $branch
+ git reset --hard origin/$branch
+ done
+else
+ for i in grundlagen__docker $BRANCHES
+ do
+ declare -n branch=${i}
+ echo -e "\nResetting $branch to tag ${branch}--$1\n"
+ git checkout $branch
+ git reset --hard ${branch}--$1
+ done
+fi
git checkout scripting