User:Refdoc/Gitosis

From CrossWire Bible Society
Jump to: navigation, search

he following is based on a blog post by ssteiner on adding a New Repository to Git/Gitosis

(https://ssteiner.wordpress.com/2009/05/13/adding-a-new-repository-under-gitosis-2/)

To create new repositories:

Add the project to the gitosis configuration Make them writable for the user you want to push as Push up the gitosis-admin configuration Create a new home for the project Initialize it as a git repository Copy all your project files into the new repository directory Add them all to the git repository Commit everything Push to the server

For example: let’s assume your username is ‘jdoe’ and you want to create a repository ‘myproject’.

In your clone of your server’s gitosis-admin, edit ‘gitosis.conf’ and add::

 [group exampleproject]
 members = jdoe
 writable = myproject

Commit that change and push the changed gitosis configuration.

   # git commit -a -m "Added new group 'exampleproject' and project
   # 'myproject'"
   # git push

Then create the local repository:

   # mkdir myproject
   # cd mypyroject
   # git init
   # ...copy all your project files in...
   # git commit -a -m "First commit"

Set it up to push to the remote:

   # git remote add crosswire gitosis@crosswire.org:myproject.git

Do some work, add, commit everything then push it up:

   # git commit -a -m "Putting away before first push to server"
   # git push crosswire master:refs/heads/master

That’s it. You now have a new project up on your git server and every time you do a git push it’ll go up.


Within the new directory you should find a sample make file.

Type 'make help' to see all the options available to you.