Skip to content

Instantly share code, notes, and snippets.

@singularitti
Created January 12, 2024 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singularitti/cb7310c2b59c2d1923b54f4eed696b5b to your computer and use it in GitHub Desktop.
Save singularitti/cb7310c2b59c2d1923b54f4eed696b5b to your computer and use it in GitHub Desktop.
Merge Git repos #Git
set -eux
rm -rf rubygems bundler
git clone https://github.com/rubygems/rubygems
git clone https://github.com/rubygems/bundler
(cd bundler
time git filter-repo --to-subdirectory-filter bundler # --tag-rename :bundler-
)
(cd rubygems
git co f553da065 # switch to the commit before the merge
git remote add bundler ../bundler
git fetch bundler --no-tags
EDITOR=true git merge --allow-unrelated-histories bundler/master
git remote remove bundler
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment