Changes between Version 2 and Version 3 of Import an existing repo into gitolite
- Timestamp:
- 05/17/25 19:13:07 (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Import an existing repo into gitolite
v2 v3 3 3 The most reliable way to import an existing Git repository into Gitolite is: 4 4 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). 6 6 7 * Add it as a remote to your existing local repository. 7 * Mirror clone the existing remote to your home directory 8 9 {{{#!sh 10 git clone --mirror existing-remote-url 11 }}} 12 13 * Add your gitolite as a remote to just cloned local repository. 14 15 {{{#!sh 16 git remote add gitolite git@my-server:/my-repo.git 17 }}} 8 18 9 19 * Push your entire history to Gitolite. 20 21 {{{#!sh 22 git push --mirror gitolite 23 }}} 24 25 * Remove your local clone afterwards 10 26 11 27 This avoids permission issues and ensures the repository structure and access controls are handled correctly.