📓
Object-Mappers-Docs
  • Introduction
  • contributing
    • Contributing
  • links
    • Resources
  • reporting
    • Bug Report
    • Custom Report
    • Feature Request Template
    • General Information
    • Issue Report
    • Pull Request Template
  • user-guide
    • Changelog
    • Code of Conduct
    • Code Owners
    • Dependency Management
    • FAQ
    • Getting Started
    • Repositories: How to move content from one repository to another one
    • Troubleshooting
    • Upgrading
  • modules
    • beancp
      • BeanCP Tutorial
    • beanmapper
      • BeanMapper Tutorial
    • beanutils
      • BeanUtils Tutorial
    • bull
      • Bull Tutorial
    • converter
      • Converter Tutorial
    • datus
      • Datus Tutorial
    • doov
      • Doov Tutorial
    • dozer
      • Dozer Tutorial
    • jmapper
      • JMapper Tutorial
    • mapstruct
      • MapStruct Tutorial
    • modelmapper
      • ModelMapper Tutorial
    • moo
      • Moo Tutorial
    • nomin
      • Nomin Tutorial
    • orika
      • Orika Tutorial
    • remap
      • ReMap Tutorial
    • selma
      • Selma Tutorial
    • smooks
      • Smooks Tutorial
Powered by GitBook
On this page
  • Goal
  • Steps

Was this helpful?

  1. user-guide

Repositories: How to move content from one repository to another one

Goal

The content from the source repository should keep the Git history.

Steps

  1. 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> \
 ...
  1. Publish that new repository

  2. 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-content
  1. Merge the extracted content:

cd <target-repository>
git merge --allow-unrelated-histories new-content/master
# (adapt the content if it's necessary)
git push origin master
  1. Remove the published repository (step 2)

  2. Create a pull request into the source repository to remove the extracted content

PreviousGetting StartedNextTroubleshooting

Last updated 3 years ago

Was this helpful?