add cviko 2_2

This commit is contained in:
Matyáš Caras 2024-09-26 22:21:03 +02:00
parent 5afd8f1f3c
commit 6c320c8763
Signed by: hernik
GPG key ID: 2A3175F98820C5C6

View file

@ -1,51 +0,0 @@
# Replit Template
**Branch switching**
```
git switch "branch_name"
git submodule update --init
```
**Submodule updates**
```
git submodule update --init --remote
git checkout main -- README.md student-config.sh .tests/.gitignore .tests/config.sh .tests/README.md -p
```
## Creating new branches
```
BRANCH="branch_name"
git branch -c main "$BRANCH"
git submodule set-branch --branch "$BRANCH" solution
```
## Propagating changes from master
```
git fetch
for BRANCH in $(git branch -r | grep -E -o "\d{2}-\d{2}-.*");
do
echo "\nRebase $BRANCH"
read
git branch -D $BRANCH
git checkout $BRANCH || break
git reset --hard origin/"$BRANCH" || break
git rebase master || break
git push --force || break
done
```
## Propagating changes of scripts
```
git fetch
for BRANCH in $(git branch -r | grep -E -o "\d{2}-\d{2}-.*");
do
echo "\nSync test scripts on $BRANCH"
read
git branch -D $BRANCH
git checkout $BRANCH || break
git submodule update --remote .tests/scripts || break
git add .tests/scripts || break
git commit -m "feat: sync latest test scripts" || break
git push || break
done
```