How to merge two git repositories May 25, 2025
Antre du Tryphon

How to merge two git repositories

May 25, 2025 · Admin GIT

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

Copyright 2012–2026, Claude "Tryphon" Théroux