tar xvfz gitlab-flow-env-branches-with-tags.tgz cd gitlab-flow-env-branches-with-tags git init git add * git commit -a -m "init" git branch -M main git remote add origin [email protected]:fabianlee/gitlab-flow-env-branches-with-tags.git git push -u origin main
cd overlays
branch_source=dev; branch=preprod git branch $branch; git switch $branch
cp -r $branch_source $branch sed -i "s/env: $branch_source/env: $branch/" $branch/ns-labels.yaml
git add $branch/* git commit -a -m "content only for $branch branch"; git push -u origin $branch git tag tag-$branch; git push --tags
branch_source=preprod; branch=prod git branch $branch; git switch $branch
cp -r $branch_source $branch sed -i "s/env: $branch_source/env: $branch/" $branch/ns-labels.yaml
git add $branch/* git commit -a -m "content only for $branch branch"; git push -u origin $branch git tag tag-$branch; git push --tags
branch=preprod git tag -d tag-$branch; git push origin :tag-$branch
git tag tag-$branch; git push --tags
timestr=$(date '+%Y-%m-%dT%H-%M-%S%z'); sed -i "s/mod2: ./mod2: TIME$timestr/" ns-labels.yaml
git commit -a -m "first change at $timestr"
sha1=$(git rev-parse --short HEAD)
sleep 3
timestr=$(date '+%Y-%m-%dT%H-%M-%S%z'); sed -i "s/mod2: ./mod2: TIME$timestr/" ns-labels.yaml
git commit -a -m "second change at
branch=preprod git tag -d tag-$branch; git push origin :tag-$branch git tag tag-$branch $sha1 ; git push --tags
git tag -d tag-$branch; git push origin :tag-$branch git tag tag-$branch $sha2 ; git push --tags
git clone [email protected]:anotheruser/gitlab-flow-env-branches-with-tags.git cd gitlab-flow-env-branches-with-tag git branch -a git checkout preprod git remote add upstream [email protected]:fabianlee/gitlab-flow-env-branches-with-tags.git
git switch main; git pull -r upstream main; git push OR git fetch upstream preprod; git merge upstream/preprod; git push