Created
May 26, 2014 15:57
-
-
Save biogeo/b1e43e8572252f584045 to your computer and use it in GitHub Desktop.
Add a directory with lots of existing work to a new Gitolite-controlled repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(All commands to be executed on the local machine.) | |
1. Create the remote repo: | |
$ cd /path/to/gitolite/admin/repo | |
$ gedit conf/gitolite.conf | |
To this file, add an entry like: | |
repo <new-repo> | |
RW+ = <gitolite-username> | |
$ git commit -a -m "Added repository <new-repo>" | |
$ git push | |
2. Put the local code under git control: | |
$ cd /path/to/current/work | |
$ git init | |
$ git add . | |
$ git commit -m "First commit of existing work" | |
3. Add the remote repo as origin: | |
$ git remote add origin <gitolite-main-user>@<host>:<new-repo>.git | |
4. Push the code to the remote: | |
$ git push -u origin master | |
(-u configures git so that subsequent push/pull commands work without specifying the remote or branch) | |
5. Celebrate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment