Skip to content

Commit

Permalink
Add script to merge repo (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaldengeki authored Feb 26, 2024
1 parent 1c779f2 commit 8b8f122
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/merge-repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euxo pipefail

REPO=$1
cd ~
rm -rf $REPO
git clone https://github.com/shaldengeki/$REPO

(
cd $REPO
time git filter-repo --to-subdirectory-filter $REPO
)

(
cd ~/monorepo/
git switch main
git remote add $REPO ../$REPO
git fetch $REPO --no-tags
EDITOR=true git merge --allow-unrelated-histories $REPO/main
git remote remove $REPO
)

0 comments on commit 8b8f122

Please sign in to comment.