Created
November 23, 2021 20:09
-
-
Save arthurio/96dac5167d7f58f93d945f602af5be69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
set -euxo pipefail | |
for service in messaging-py | |
do | |
( | |
cd $service | |
git clean -fd . | |
mkdir $service | |
mv .* * $service || true | |
mv $service/.git . | |
git add . | |
git commit -a -S -m "Moving old project into its own subdirectory" --no-verify | |
cd ../notivize | |
git remote add $service ../$service | |
git fetch $service | |
git co -b merge-$service | |
git merge -S --allow-unrelated-histories $service/main | |
git push origin merge-$service | |
cd ../$service | |
git reset --soft HEAD~1 | |
git reset . | |
git checkout . | |
mv $service/.* . || true | |
rm -rf $service | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment