Skip to content

Instantly share code, notes, and snippets.

@r17x
Created January 15, 2024 09:14
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 r17x/a59e37ff13dae508708a91f80651f75b to your computer and use it in GitHub Desktop.
Save r17x/a59e37ff13dae508708a91f80651f75b to your computer and use it in GitHub Desktop.
Merge 2 Repository
# Do with fresh clone
git clone REPO1 A
git clone REPO2 B

cd A

# bundle repo as directory (I hate CONFLICT by structure project, so new repo, new directory)
git filter-repo --to-subdirectory-filter apps/A
cd B
git remote add A ../A # local remote 
git checkout -B chore/merged-A-into-B
git merge --allow-unrelated-histories A/master

Done!# open PRS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment