Gitolite: add new repository

I enable certain users to create repositories by adding this to gitolite.conf file:

repo [a-zA-Z0-9].*
C = @admin @staff
RW = WRITERS @admin
R = READERS @staff

To create a new repo I had to do this:

  1. checkout a empty repository with the new repo name as the project
    git checkout gitolite@gitserver:newproject
  2. Copy over files
  3. Commit files git
    commit -a -m "Initial Checkin"
  4. Push files to server
    git add remote newproject gitolite@gitserver:newproject
    git push newproject master

Originally I was trying to do it:

mkdir newproject
git init
git add .
git commit -a -m "Initial checkin"
git push

But ran into this error:
fatal: No destination configured to push to.
Since I ran into this error, I found another way to do it.

This entry was posted in Git and tagged , , , , , . Bookmark the permalink.

3 Responses to Gitolite: add new repository

  1. alex says:

    do this:

    git remote add orgiin gitolite@gitserver:newproject
    git push origin master

    then later on you could simply do:

    git push
  2. fangstar says:

    nice! your command worked nicely!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s