Repositories: How to move content from one repository to another one
Goal
The content from the source repository should keep the Git history.
Steps
Create a new repository with the content to move:
git clone git@github.com:AlexRogalskiy/<source-repository>.git
cd <source-repository>
git-filter-repo --path <path-to-extract> \
--path <path-to-extract> \
--path <path-to-extract> \
...Publish that new repository
Add it as a remote repository to the target repository:
git clone git@github.com:AlexRogalskiy/<target-repository>.git
cd <target-repository>
git remote add new-content <url>
git fetch new-contentMerge the extracted content:
Remove the published repository (step 2)
Create a pull request into the source repository to remove the extracted content
Last updated
Was this helpful?