Ensure user is on dev branch if it exists.
This commit is contained in:
@@ -564,6 +564,13 @@
|
|||||||
echo -e "\n*** `basename $project` ***"
|
echo -e "\n*** `basename $project` ***"
|
||||||
cd $project
|
cd $project
|
||||||
if [[ -d .git ]]; then
|
if [[ -d .git ]]; then
|
||||||
|
git ls-remote --exit-code origin dev
|
||||||
|
dev_exists="$?"
|
||||||
|
if [[ "$dev_exists" == 0 ]];
|
||||||
|
git switch dev
|
||||||
|
else
|
||||||
|
git switch main
|
||||||
|
fi
|
||||||
git pull
|
git pull
|
||||||
git push
|
git push
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user