wiki:Import an existing repo into gitolite

Importing Existing Repositories

The most reliable way to import an existing Git repository into Gitolite is:

  • Let Gitolite create an empty repository, e.g. my-repo (by defining it in gitolite.conf).
  • Mirror clone the existing remote to your home directory
git clone --mirror existing-remote-url
  • Add your new gitolite service as a remote to just cloned local repository.
git remote add gitolite git@my-server:/my-repo.git
  • Push your entire history to Gitolite.
git push --mirror gitolite
  • Remove your local clone afterwards

This avoids permission issues and ensures the repository structure and access controls are handled correctly.

back

Last modified 7 days ago Last modified on 05/17/25 19:13:36
Note: See TracWiki for help on using the wiki.