Skip to content

Handy library for copying repositories from one git host to another

License

Notifications You must be signed in to change notification settings

tylerjgarland/git2git

Repository files navigation

Pre-Release

The intention of this is app is to eventually allow the synchronization of git repositories between GitHub, GitLab, BitBucket, and others.

How To Use

  1. Download appropriate binary for your OS
  2. Generate GitLab token with permissions:

image

  1. Generate GitHub token with permissions:

image

  1. git2git --target-token 1234 --origin-token 5678 --target gitlab --origin github

Supported Flags

  • --target-token
  • --origin-token
  • --target (gitlab,github)
  • --origin (gitlab,github)

Latest Release

Supports sync of all branches for (github -> gitlab) (gitlab -> github) (github -> github) (gitlab -> gitlab).

Some caveats:

Only copies repositories that aren't empty. Only copies repositories that don't have same-named repositories in . Only copies git history. Issues and other metadata aren't copied.

Warning: Do not try this if you have repositories in the target that have the same name as the ones you're trying to sync.

Milestones

  • Copy all owned, private repositories from GitLab to GitHub
  • Copy all owned, private repositories from GitHub to GitLab
  • Copy all owned, private repositories from GitLab to GitLab
  • Copy all owned, private repositories from GitHub to GitHub
  • Synchronize latest changes from repositories to the next
  • Interactive mode where repositories can be selected
  • Add support for additional flags (archived, public, private, ... repositories)
  • Add support for other git hosting environments
  • Schedule Synchronization
  • Copy issues w/ content from one project to another
  • Zip up repositories and copy to backup location (Google Drive, etc)

About

Handy library for copying repositories from one git host to another

Resources

License

Stars

Watchers

Forks