Skip to content

swingbit/mergeGitRepos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mergeGitRepos

mergeGitRepos is a simple Python script to merge several Git repositories into one, preserving history and mapping branches.

Features

  • Simple Yaml configuration
  • Safe. It works on checkouts of the original repositories and creates a new local repository that has no remote defined. Nothing is ever pushed anywhere.
  • Each source repository becomes a subfolder in the new repository, optionally renamed
  • Explicit mapping of which source branches need to be merged into which destination branch

Requirements

Usage

  • DO NOT use this script in a folder with your existing repos. Start in an empty folder.
  • clone mergeGitRepos and move into it.
  • copy mergeGitRepos.conf.template into mergeGitRepos.conf
  • edit mergeGitRepos.conf (the template is pre-configured with a working example. You can run it as-is the first time and see what it produces).
  • run ./mergeGitRepos.py (--help for help)
  • go into the new folder and explore content and history.
  • if happy, define a git remote (none is defined by the script) and push

About

Merge several Git repositories into one

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages