wiki:Import an existing repo into gitolite

Version 4 (modified by enno, 7 days ago) ( diff )

--

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

Note: See TracWiki for help on using the wiki.