Changes between Version 2 and Version 3 of Import an existing repo into gitolite


Ignore:
Timestamp:
05/17/25 19:13:07 (7 days ago)
Author:
enno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Import an existing repo into gitolite

    v2 v3  
    33The most reliable way to import an existing Git repository into Gitolite is:
    44
    5 * Let Gitolite create an empty repository (by defining it in gitolite.conf).
     5* Let Gitolite create an empty repository, e.g. my-repo (by defining it in gitolite.conf).
    66
    7 * Add it as a remote to your existing local repository.
     7* Mirror clone the existing remote to your home directory
     8
     9{{{#!sh
     10git clone --mirror existing-remote-url
     11}}}
     12
     13* Add your gitolite as a remote to just cloned local repository.
     14
     15{{{#!sh
     16git remote add gitolite git@my-server:/my-repo.git
     17}}}
    818
    919* Push your entire history to Gitolite.
     20
     21{{{#!sh
     22git push --mirror gitolite
     23}}}
     24
     25* Remove your local clone afterwards
    1026
    1127This avoids permission issues and ensures the repository structure and access controls are handled correctly.