The question is related to this and 100s of similar other SO threads. I have a variable like and its usage like below:
branchtochechout = "develop"
echo "Branch To Chechout is : $branchtochechout"
for thedir in ./*/ ;
do (
echo -e "Checking out in the directory:$thedir";
cd "$thedir" && git checkout $branchtochechout);
sleep 2
done
To my surprise, $branchtochechout gives me null in the echo statement as well in the for loop. Does this git-bash (windows) not work similar to linux bash scripting? Please help me understand what I am doing wrong here?