How to merge two git repositories

These steps will let you merge a source repository into a destination repository.

  • cd source-repository-directory
  • git checkout the source branch
  • cd destination-repository-directory
  • git remote add source-repository-name source-repository-directory
  • git fetch source-repository-name –tags
  • git merge –allow-unrelated-histories source-repository-name/branch
  • git remote remove source-repository-name

Leave comment

Your email address will not be published. Required fields are marked with *.

Time limit is exhausted. Please reload the CAPTCHA.